[postgis-tickets] r17625 - Take out restriction that geography can only work with srid 4326

Regina Obe lr at pcorp.us
Sun Jul 28 06:47:17 PDT 2019


Author: robe
Date: 2019-07-28 18:47:16 -0700 (Sun, 28 Jul 2019)
New Revision: 17625

Modified:
   trunk/loader/shp2pgsql-core.c
Log:
Take out restriction that geography can only work with srid 4326
Geography supports any long-lat projection since 2.2
Closes #4465

Modified: trunk/loader/shp2pgsql-core.c
===================================================================
--- trunk/loader/shp2pgsql-core.c	2019-07-29 01:11:07 UTC (rev 17624)
+++ trunk/loader/shp2pgsql-core.c	2019-07-29 01:47:16 UTC (rev 17625)
@@ -1387,12 +1387,6 @@
 			else
 				dimschar = "";
 
-			if (state->to_srid != SRID_UNKNOWN && state->to_srid != 4326)
-			{
-				snprintf(state->message, SHPLOADERMSGLEN, _("Invalid SRID for geography type: %d"), state->to_srid);
-				stringbuffer_destroy(sb);
-				return SHPLOADERERR;
-			}
 			stringbuffer_aprintf(sb, ",\n\"%s\" geography(%s%s,%d)", state->geo_col, state->pgtype, dimschar, 4326);
 		}
 		stringbuffer_aprintf(sb, ")");



More information about the postgis-tickets mailing list