]> granicus.if.org Git - postgis/commitdiff
Fix wrong OGC URN in GeoJson and GML output. Cf #507
authorOlivier Courtin <olivier.courtin@camptocamp.com>
Tue, 27 Apr 2010 13:58:41 +0000 (13:58 +0000)
committerOlivier Courtin <olivier.courtin@camptocamp.com>
Tue, 27 Apr 2010 13:58:41 +0000 (13:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5572 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_output.xml
liblwgeom/cunit/cu_out_gml.c
postgis/lwgeom_export.c
regress/out_geography_expected
regress/out_geometry_expected

index 7a098020610a05a8cd4b2ba84760cea857cad97b..429791a1ec3df26a59cf27ca4186143de237846b 100644 (file)
@@ -326,7 +326,7 @@ CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)
                                </listitem>
 
                                <listitem>
-                                 <para>4: GeoJSON Long CRS (e.g urn:ogc:def:crs:EPSG:4326)</para>
+                                 <para>4: GeoJSON Long CRS (e.g urn:ogc:def:crs:EPSG::4326)</para>
                                </listitem>
                          </itemizedlist>
                        </para>
@@ -471,7 +471,7 @@ st_asgeojson
                                                                </listitem>
 
                                                                <listitem>
-                                                                 <para>1: GML Long CRS (e.g urn:ogc:def:crs:EPSG:4326)</para>
+                                                                 <para>1: GML Long CRS (e.g urn:ogc:def:crs:EPSG::4326)</para>
                                                                </listitem>
 
                                                                <listitem>
@@ -502,7 +502,7 @@ namespace prefix or no prefix (if empty). If null or omitted 'gml' prefix is use
                <programlisting><![CDATA[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>]]>
+               <gml:Point srsName="urn:ogc:def:crs:EPSG::4326"><gml:pos>6.34535 5.23423</gml:pos></gml:Point>]]>
                        </programlisting>
 
          </refsection>
index ba24a3b058477db309e1e8839359a74065c1e24b..67140526851c34b2f11fb323385a90c36d13e9af 100644 (file)
@@ -278,14 +278,14 @@ static void out_gml_test_geodetic(void)
        /* GML3 - Geodetic Point */
        do_gml3_test(
            "POINT(0 1)",
-           "<gml:Point srsName=\"urn:ogc:def:crs:EPSG:4326\"><gml:pos srsDimension=\"2\">1 0</gml:pos></gml:Point>",
-           "urn:ogc:def:crs:EPSG:4326", 0, 1);
+           "<gml:Point srsName=\"urn:ogc:def:crs:EPSG::4326\"><gml:pos srsDimension=\"2\">1 0</gml:pos></gml:Point>",
+           "urn:ogc:def:crs:EPSG::4326", 0, 1);
 
        /* GML3 - 3D Geodetic Point */
        do_gml3_test(
            "POINT(0 1 2)",
-           "<gml:Point srsName=\"urn:ogc:def:crs:EPSG:4326\"><gml:pos srsDimension=\"3\">1 0 2</gml:pos></gml:Point>",
-           "urn:ogc:def:crs:EPSG:4326", 0, 1);
+           "<gml:Point srsName=\"urn:ogc:def:crs:EPSG::4326\"><gml:pos srsDimension=\"3\">1 0 2</gml:pos></gml:Point>",
+           "urn:ogc:def:crs:EPSG::4326", 0, 1);
 }
 
 
index b0becf8e9377e020f38f9c0c883171e8161edeb0..ccaca578a14426d46f8b2dd0be1a18bbc6b248e7 100644 (file)
@@ -32,7 +32,7 @@ Datum LWGEOM_asSVG(PG_FUNCTION_ARGS);
  * Require valid spatial_ref_sys table entry
  *
  * Could return SRS as short one (i.e EPSG:4326)
- * or as long one: (i.e urn:ogc:def:crs:EPSG:4326)
+ * or as long one: (i.e urn:ogc:def:crs:EPSG::4326)
  */
 char * getSRSbySRID(int SRID, bool short_crs)
 {
@@ -51,7 +51,7 @@ char * getSRSbySRID(int SRID, bool short_crs)
                sprintf(query, "SELECT auth_name||':'||auth_srid \
                        FROM spatial_ref_sys WHERE srid='%d'", SRID);
        else
-               sprintf(query, "SELECT 'urn:ogc:def:crs:'||auth_name||':'||auth_srid \
+               sprintf(query, "SELECT 'urn:ogc:def:crs:'||auth_name||'::'||auth_srid \
                        FROM spatial_ref_sys WHERE srid='%d'", SRID);
 
        err = SPI_exec(query, 1);
index b8cfe38d4af1af3a45b3689390fd9bf94f1ba173..0b8fa9a8f8b99ea754068d70840de7b8f9b20709 100644 (file)
@@ -6,11 +6,11 @@ gml_version_02|<gml:Point srsName="EPSG:4326"><gml:pos srsDimension="2">1 1</gml
 ERROR:  Only GML 2 and GML 3 are supported
 ERROR:  Only GML 2 and GML 3 are supported
 gml_option_01|<gml:Point srsName="EPSG:4326"><gml:coordinates>1,1</gml:coordinates></gml:Point>
-gml_option_02|<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:pos srsDimension="2">1 1</gml:pos></gml:Point>
+gml_option_02|<gml:Point srsName="urn:ogc:def:crs:EPSG::4326"><gml:pos srsDimension="2">1 1</gml:pos></gml:Point>
 gml_deegree_01|<gml:Point srsName="EPSG:4326"><gml:coordinates>1,2</gml:coordinates></gml:Point>
-gml_deegree_02|<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>1,2</gml:coordinates></gml:Point>
+gml_deegree_02|<gml:Point srsName="urn:ogc:def:crs:EPSG::4326"><gml:coordinates>1,2</gml:coordinates></gml:Point>
 gml_deegree_03|<gml:Point srsName="EPSG:4326"><gml:pos srsDimension="2">1 2</gml:pos></gml:Point>
-gml_deegree_04|<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:pos srsDimension="2">2 1</gml:pos></gml:Point>
+gml_deegree_04|<gml:Point srsName="urn:ogc:def:crs:EPSG::4326"><gml:pos srsDimension="2">2 1</gml:pos></gml:Point>
 gml_prefix_01|<Point srsName="EPSG:4326"><coordinates>1,2</coordinates></Point>
 gml_prefix_02|<Point srsName="EPSG:4326"><pos srsDimension="2">1 2</pos></Point>
 gml_prefix_03|<foo:Point srsName="EPSG:4326"><foo:coordinates>1,2</foo:coordinates></foo:Point>
@@ -41,14 +41,14 @@ 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]}
+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:  Only SRID SRID_DEFAULT is currently supported in geography.
 ERROR:  Only SRID SRID_DEFAULT is currently supported in geography.
 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_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]]}
@@ -57,11 +57,11 @@ geojson_options_05|{"type":"LineString","crs":{"type":"name","properties":{"name
 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]]}
+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]]}
index c9be1c42e96c84e4f9d6d6b111fe7e483a65917c..917afa69622abb774f163dd82514ab607028f48c 100644 (file)
@@ -6,7 +6,7 @@ gml_version_02|<gml:Point srsName="EPSG:4326"><gml:pos srsDimension="2">1 1</gml
 ERROR:  Only GML 2 and GML 3 are supported
 ERROR:  Only GML 2 and GML 3 are supported
 gml_option_01|<gml:Point srsName="EPSG:4326"><gml:coordinates>1,1</gml:coordinates></gml:Point>
-gml_option_02|<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:pos srsDimension="2">1 1</gml:pos></gml:Point>
+gml_option_02|<gml:Point srsName="urn:ogc:def:crs:EPSG::4326"><gml:pos srsDimension="2">1 1</gml:pos></gml:Point>
 gml_deegree_01|<gml:Point srsName="EPSG:4326"><gml:pos srsDimension="2">1 2</gml:pos></gml:Point>
 gml_deegree_02|<gml:Point srsName="EPSG:4326"><gml:coordinates>1,2</gml:coordinates></gml:Point>
 gml_deegree_03|<gml:Point srsName="EPSG:4326"><gml:pos srsDimension="2">2 1</gml:pos></gml:Point>
@@ -43,7 +43,7 @@ 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_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
@@ -60,10 +60,10 @@ geojson_options_06|{"type":"LineString","crs":{"type":"name","properties":{"name
 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_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_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_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]]}
+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]]}