@@ -140,19 +140,31 @@ static void ows_srs_set_is_geographic_and_is_axis_order_gis_friendly_from_def(
140140 * ptr = '\0' ;
141141
142142 s -> is_axis_order_gis_friendly = true;
143- s -> is_geographic = strstr (srtext , "PROJCS[" ) == NULL &&
144- strstr (srtext , "GEOCCS[" ) == NULL ;
143+ s -> is_geographic = (strstr (srtext , "PROJCS[" ) == NULL &&
144+ strstr (srtext , "GEOCCS[" ) == NULL &&
145+ strstr (srtext , "BOUNDCRS[" ) == NULL ) ||
146+ strstr (srtext , "BOUNDCRS[SOURCECRS[GEOGCRS" ) != NULL ;
145147
146- if ( strstr (srtext_horizontal , "AXIS[" ) == NULL )
148+ if ( strstr (srtext_horizontal , "AXIS[" ) == NULL &&
149+ strstr (srtext_horizontal , "GEOCCS[" ) == NULL )
147150 {
148151 /* If there is no axis definition, then due to how GDAL < 3
149- * generated the WKT, this means that the axis order is not
150- * GIS friendly */
152+ * generated the WKT, this means that the axis order is not
153+ * GIS friendly */
151154 s -> is_axis_order_gis_friendly = false;
152155 }
153- /* In case PostGIS incorporates full WKT output some day... */
154156 else if ( strstr (srtext_horizontal ,
155- "AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]" ) != NULL )
157+ "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]" ) != NULL )
158+ {
159+ s -> is_axis_order_gis_friendly = false;
160+ }
161+ else if ( strstr (srtext_horizontal ,
162+ "AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]" ) != NULL )
163+ {
164+ s -> is_axis_order_gis_friendly = false;
165+ }
166+ else if ( strstr (srtext_horizontal ,
167+ "AXIS[\"geodetic latitude (Lat)\",north,ORDER[1]" ) != NULL )
156168 {
157169 s -> is_axis_order_gis_friendly = false;
158170 }
0 commit comments