PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ out_gml_test_geoms_prefix()

static void out_gml_test_geoms_prefix ( void  )
static

Definition at line 601 of file cu_out_gml.c.

References do_gml2_test_prefix(), and do_gml3_test_prefix().

Referenced by out_gml_suite_setup().

602 {
603  /* GML2 - Linestring */
605  "LINESTRING(0 1,2 3,4 5)",
606  "<custom:LineString><custom:coordinates>0,1 2,3 4,5</custom:coordinates></custom:LineString>",
607  NULL, 0, "custom:");
608 
609  /* GML3 - Linestring */
611  "LINESTRING(0 1,2 3,4 5)",
612  "<custom:Curve><custom:segments><custom:LineStringSegment><custom:posList srsDimension=\"2\">0 1 2 3 4 5</custom:posList></custom:LineStringSegment></custom:segments></custom:Curve>",
613  NULL, 0, 0, "custom:");
614 
615 
616  /* GML2 Polygon */
618  "POLYGON((0 1,2 3,4 5,0 1))",
619  "<custom:Polygon><custom:outerBoundaryIs><custom:LinearRing><custom:coordinates>0,1 2,3 4,5 0,1</custom:coordinates></custom:LinearRing></custom:outerBoundaryIs></custom:Polygon>",
620  NULL, 0, "custom:");
621 
622  /* GML3 Polygon */
624  "POLYGON((0 1,2 3,4 5,0 1))",
625  "<custom:Polygon><custom:exterior><custom:LinearRing><custom:posList srsDimension=\"2\">0 1 2 3 4 5 0 1</custom:posList></custom:LinearRing></custom:exterior></custom:Polygon>",
626  NULL, 0, 0, "custom:");
627 
628 
629  /* GML2 Polygon - with internal ring */
631  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
632  "<custom:Polygon><custom:outerBoundaryIs><custom:LinearRing><custom:coordinates>0,1 2,3 4,5 0,1</custom:coordinates></custom:LinearRing></custom:outerBoundaryIs><custom:innerBoundaryIs><custom:LinearRing><custom:coordinates>6,7 8,9 10,11 6,7</custom:coordinates></custom:LinearRing></custom:innerBoundaryIs></custom:Polygon>",
633  NULL, 0, "custom:");
634 
635  /* GML3 Polygon - with internal ring */
637  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
638  "<custom:Polygon><custom:exterior><custom:LinearRing><custom:posList srsDimension=\"2\">0 1 2 3 4 5 0 1</custom:posList></custom:LinearRing></custom:exterior><custom:interior><custom:LinearRing><custom:posList srsDimension=\"2\">6 7 8 9 10 11 6 7</custom:posList></custom:LinearRing></custom:interior></custom:Polygon>",
639  NULL, 0, 0, "custom:");
640 
641  /* GML3 Triangle */
643  "TRIANGLE((0 1,2 3,4 5,0 1))",
644  "<custom:Triangle><custom:exterior><custom:LinearRing><custom:posList srsDimension=\"2\">0 1 2 3 4 5 0 1</custom:posList></custom:LinearRing></custom:exterior></custom:Triangle>",
645  NULL, 0, 0, "custom:");
646 
647 
648  /* GML2 MultiPoint */
650  "MULTIPOINT(0 1,2 3)",
651  "<custom:MultiPoint><custom:pointMember><custom:Point><custom:coordinates>0,1</custom:coordinates></custom:Point></custom:pointMember><custom:pointMember><custom:Point><custom:coordinates>2,3</custom:coordinates></custom:Point></custom:pointMember></custom:MultiPoint>",
652  NULL, 0, "custom:");
653 
654  /* GML3 MultiPoint */
656  "MULTIPOINT(0 1,2 3)",
657  "<custom:MultiPoint><custom:pointMember><custom:Point><custom:pos srsDimension=\"2\">0 1</custom:pos></custom:Point></custom:pointMember><custom:pointMember><custom:Point><custom:pos srsDimension=\"2\">2 3</custom:pos></custom:Point></custom:pointMember></custom:MultiPoint>",
658  NULL, 0, 0, "custom:");
659 
660 
661  /* GML2 Multiline */
663  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
664  "<custom:MultiLineString><custom:lineStringMember><custom:LineString><custom:coordinates>0,1 2,3 4,5</custom:coordinates></custom:LineString></custom:lineStringMember><custom:lineStringMember><custom:LineString><custom:coordinates>6,7 8,9 10,11</custom:coordinates></custom:LineString></custom:lineStringMember></custom:MultiLineString>",
665  NULL, 0, "custom:");
666 
667  /* GML3 Multiline */
669  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
670  "<custom:MultiCurve><custom:curveMember><custom:Curve><custom:segments><custom:LineStringSegment><custom:posList srsDimension=\"2\">0 1 2 3 4 5</custom:posList></custom:LineStringSegment></custom:segments></custom:Curve></custom:curveMember><custom:curveMember><custom:Curve><custom:segments><custom:LineStringSegment><custom:posList srsDimension=\"2\">6 7 8 9 10 11</custom:posList></custom:LineStringSegment></custom:segments></custom:Curve></custom:curveMember></custom:MultiCurve>",
671  NULL, 0, 0, "custom:");
672 
673 
674  /* GML2 MultiPolygon */
676  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
677  "<custom:MultiPolygon><custom:polygonMember><custom:Polygon><custom:outerBoundaryIs><custom:LinearRing><custom:coordinates>0,1 2,3 4,5 0,1</custom:coordinates></custom:LinearRing></custom:outerBoundaryIs></custom:Polygon></custom:polygonMember><custom:polygonMember><custom:Polygon><custom:outerBoundaryIs><custom:LinearRing><custom:coordinates>6,7 8,9 10,11 6,7</custom:coordinates></custom:LinearRing></custom:outerBoundaryIs></custom:Polygon></custom:polygonMember></custom:MultiPolygon>",
678  NULL, 0, "custom:");
679 
680  /* GML3 MultiPolygon */
682  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
683  "<custom:MultiSurface><custom:surfaceMember><custom:Polygon><custom:exterior><custom:LinearRing><custom:posList srsDimension=\"2\">0 1 2 3 4 5 0 1</custom:posList></custom:LinearRing></custom:exterior></custom:Polygon></custom:surfaceMember><custom:surfaceMember><custom:Polygon><custom:exterior><custom:LinearRing><custom:posList srsDimension=\"2\">6 7 8 9 10 11 6 7</custom:posList></custom:LinearRing></custom:exterior></custom:Polygon></custom:surfaceMember></custom:MultiSurface>",
684  NULL, 0, 0, "custom:");
685 
686  /* GML3 PolyhedralSurface */
688  "POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
689  "<custom:PolyhedralSurface><custom:polygonPatches><custom:PolygonPatch><custom:exterior><custom:LinearRing><custom:posList srsDimension=\"2\">0 1 2 3 4 5 0 1</custom:posList></custom:LinearRing></custom:exterior></custom:PolygonPatch><custom:PolygonPatch><custom:exterior><custom:LinearRing><custom:posList srsDimension=\"2\">6 7 8 9 10 11 6 7</custom:posList></custom:LinearRing></custom:exterior></custom:PolygonPatch></custom:polygonPatches></custom:PolyhedralSurface>",
690  NULL, 0, 0, "custom:");
691 
692  /* GML3 Tin */
694  "TIN(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
695  "<custom:Tin><custom:trianglePatches><custom:Triangle><custom:exterior><custom:LinearRing><custom:posList srsDimension=\"2\">0 1 2 3 4 5 0 1</custom:posList></custom:LinearRing></custom:exterior></custom:Triangle><custom:Triangle><custom:exterior><custom:LinearRing><custom:posList srsDimension=\"2\">6 7 8 9 10 11 6 7</custom:posList></custom:LinearRing></custom:exterior></custom:Triangle></custom:trianglePatches></custom:Tin>",
696  NULL, 0, 0, "custom:");
697 
698  /* GML2 - GeometryCollection */
700  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
701  "<custom:MultiGeometry><custom:geometryMember><custom:Point><custom:coordinates>0,1</custom:coordinates></custom:Point></custom:geometryMember><custom:geometryMember><custom:LineString><custom:coordinates>2,3 4,5</custom:coordinates></custom:LineString></custom:geometryMember></custom:MultiGeometry>",
702  NULL, 0, "custom:");
703 
704  /* GML3 - GeometryCollection */
706  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
707  "<custom:MultiGeometry><custom:geometryMember><custom:Point><custom:pos srsDimension=\"2\">0 1</custom:pos></custom:Point></custom:geometryMember><custom:geometryMember><custom:Curve><custom:segments><custom:LineStringSegment><custom:posList srsDimension=\"2\">2 3 4 5</custom:posList></custom:LineStringSegment></custom:segments></custom:Curve></custom:geometryMember></custom:MultiGeometry>",
708  NULL, 0, 0, "custom:");
709 
710  /* GML2 - Nested GeometryCollection */
712  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
713  "<custom:MultiGeometry><custom:geometryMember><custom:Point><custom:coordinates>0,1</custom:coordinates></custom:Point></custom:geometryMember><custom:geometryMember><custom:MultiGeometry><custom:geometryMember><custom:LineString><custom:coordinates>2,3 4,5</custom:coordinates></custom:LineString></custom:geometryMember></custom:MultiGeometry></custom:geometryMember></custom:MultiGeometry>",
714  NULL, 0, "custom:");
715 
716  /* GML3 - Nested GeometryCollection */
718  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
719  "<custom:MultiGeometry><custom:geometryMember><custom:Point><custom:pos srsDimension=\"2\">0 1</custom:pos></custom:Point></custom:geometryMember><custom:geometryMember><custom:MultiGeometry><custom:geometryMember><custom:Curve><custom:segments><custom:LineStringSegment><custom:posList srsDimension=\"2\">2 3 4 5</custom:posList></custom:LineStringSegment></custom:segments></custom:Curve></custom:geometryMember></custom:MultiGeometry></custom:geometryMember></custom:MultiGeometry>",
720  NULL, 0, 0, "custom:");
721 
722  /*------------- empty prefixes below ------------------------ */
723 
724  /* GML2 - Linestring */
726  "LINESTRING(0 1,2 3,4 5)",
727  "<LineString><coordinates>0,1 2,3 4,5</coordinates></LineString>",
728  NULL, 0, "");
729 
730  /* GML3 - Linestring */
732  "LINESTRING(0 1,2 3,4 5)",
733  "<Curve><segments><LineStringSegment><posList srsDimension=\"2\">0 1 2 3 4 5</posList></LineStringSegment></segments></Curve>",
734  NULL, 0, 0, "");
735 
736 
737  /* GML2 Polygon */
739  "POLYGON((0 1,2 3,4 5,0 1))",
740  "<Polygon><outerBoundaryIs><LinearRing><coordinates>0,1 2,3 4,5 0,1</coordinates></LinearRing></outerBoundaryIs></Polygon>",
741  NULL, 0, "");
742 
743  /* GML3 Polygon */
745  "POLYGON((0 1,2 3,4 5,0 1))",
746  "<Polygon><exterior><LinearRing><posList srsDimension=\"2\">0 1 2 3 4 5 0 1</posList></LinearRing></exterior></Polygon>",
747  NULL, 0, 0, "");
748 
749 
750  /* GML2 Polygon - with internal ring */
752  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
753  "<Polygon><outerBoundaryIs><LinearRing><coordinates>0,1 2,3 4,5 0,1</coordinates></LinearRing></outerBoundaryIs><innerBoundaryIs><LinearRing><coordinates>6,7 8,9 10,11 6,7</coordinates></LinearRing></innerBoundaryIs></Polygon>",
754  NULL, 0, "");
755 
756  /* GML3 Polygon - with internal ring */
758  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
759  "<Polygon><exterior><LinearRing><posList srsDimension=\"2\">0 1 2 3 4 5 0 1</posList></LinearRing></exterior><interior><LinearRing><posList srsDimension=\"2\">6 7 8 9 10 11 6 7</posList></LinearRing></interior></Polygon>",
760  NULL, 0, 0, "");
761 
762  /* GML3 Triangle */
764  "TRIANGLE((0 1,2 3,4 5,0 1))",
765  "<Triangle><exterior><LinearRing><posList srsDimension=\"2\">0 1 2 3 4 5 0 1</posList></LinearRing></exterior></Triangle>",
766  NULL, 0, 0, "");
767 
768 
769  /* GML2 MultiPoint */
771  "MULTIPOINT(0 1,2 3)",
772  "<MultiPoint><pointMember><Point><coordinates>0,1</coordinates></Point></pointMember><pointMember><Point><coordinates>2,3</coordinates></Point></pointMember></MultiPoint>",
773  NULL, 0, "");
774 
775  /* GML3 MultiPoint */
777  "MULTIPOINT(0 1,2 3)",
778  "<MultiPoint><pointMember><Point><pos srsDimension=\"2\">0 1</pos></Point></pointMember><pointMember><Point><pos srsDimension=\"2\">2 3</pos></Point></pointMember></MultiPoint>",
779  NULL, 0, 0, "");
780 
781 
782  /* GML2 Multiline */
784  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
785  "<MultiLineString><lineStringMember><LineString><coordinates>0,1 2,3 4,5</coordinates></LineString></lineStringMember><lineStringMember><LineString><coordinates>6,7 8,9 10,11</coordinates></LineString></lineStringMember></MultiLineString>",
786  NULL, 0, "");
787 
788  /* GML3 Multiline */
790  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
791  "<MultiCurve><curveMember><Curve><segments><LineStringSegment><posList srsDimension=\"2\">0 1 2 3 4 5</posList></LineStringSegment></segments></Curve></curveMember><curveMember><Curve><segments><LineStringSegment><posList srsDimension=\"2\">6 7 8 9 10 11</posList></LineStringSegment></segments></Curve></curveMember></MultiCurve>",
792  NULL, 0, 0, "");
793 
794 
795  /* GML2 MultiPolygon */
797  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
798  "<MultiPolygon><polygonMember><Polygon><outerBoundaryIs><LinearRing><coordinates>0,1 2,3 4,5 0,1</coordinates></LinearRing></outerBoundaryIs></Polygon></polygonMember><polygonMember><Polygon><outerBoundaryIs><LinearRing><coordinates>6,7 8,9 10,11 6,7</coordinates></LinearRing></outerBoundaryIs></Polygon></polygonMember></MultiPolygon>",
799  NULL, 0, "");
800 
801  /* GML3 MultiPolygon */
803  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
804  "<MultiSurface><surfaceMember><Polygon><exterior><LinearRing><posList srsDimension=\"2\">0 1 2 3 4 5 0 1</posList></LinearRing></exterior></Polygon></surfaceMember><surfaceMember><Polygon><exterior><LinearRing><posList srsDimension=\"2\">6 7 8 9 10 11 6 7</posList></LinearRing></exterior></Polygon></surfaceMember></MultiSurface>",
805  NULL, 0, 0, "");
806 
807  /* GML3 PolyhedralSurface */
809  "POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
810  "<PolyhedralSurface><polygonPatches><PolygonPatch><exterior><LinearRing><posList srsDimension=\"2\">0 1 2 3 4 5 0 1</posList></LinearRing></exterior></PolygonPatch><PolygonPatch><exterior><LinearRing><posList srsDimension=\"2\">6 7 8 9 10 11 6 7</posList></LinearRing></exterior></PolygonPatch></polygonPatches></PolyhedralSurface>",
811  NULL, 0, 0, "");
812 
813  /* GML3 PolyhedralSurface */
815  "TIN(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
816  "<Tin><trianglePatches><Triangle><exterior><LinearRing><posList srsDimension=\"2\">0 1 2 3 4 5 0 1</posList></LinearRing></exterior></Triangle><Triangle><exterior><LinearRing><posList srsDimension=\"2\">6 7 8 9 10 11 6 7</posList></LinearRing></exterior></Triangle></trianglePatches></Tin>",
817  NULL, 0, 0, "");
818 
819  /* GML2 - GeometryCollection */
821  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
822  "<MultiGeometry><geometryMember><Point><coordinates>0,1</coordinates></Point></geometryMember><geometryMember><LineString><coordinates>2,3 4,5</coordinates></LineString></geometryMember></MultiGeometry>",
823  NULL, 0, "");
824 
825  /* GML3 - GeometryCollection */
827  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
828  "<MultiGeometry><geometryMember><Point><pos srsDimension=\"2\">0 1</pos></Point></geometryMember><geometryMember><Curve><segments><LineStringSegment><posList srsDimension=\"2\">2 3 4 5</posList></LineStringSegment></segments></Curve></geometryMember></MultiGeometry>",
829  NULL, 0, 0, "");
830 
831  /* GML2 - Nested GeometryCollection */
833  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
834  "<MultiGeometry><geometryMember><Point><coordinates>0,1</coordinates></Point></geometryMember><geometryMember><MultiGeometry><geometryMember><LineString><coordinates>2,3 4,5</coordinates></LineString></geometryMember></MultiGeometry></geometryMember></MultiGeometry>",
835  NULL, 0, "");
836 
837  /* GML3 - Nested GeometryCollection */
839  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
840  "<MultiGeometry><geometryMember><Point><pos srsDimension=\"2\">0 1</pos></Point></geometryMember><geometryMember><MultiGeometry><geometryMember><Curve><segments><LineStringSegment><posList srsDimension=\"2\">2 3 4 5</posList></LineStringSegment></segments></Curve></geometryMember></MultiGeometry></geometryMember></MultiGeometry>",
841  NULL, 0, 0, "");
842 
843 
844 
845 }
static void do_gml2_test_prefix(char *in, char *out, char *srs, int precision, const char *prefix)
Definition: cu_out_gml.c:38
static void do_gml3_test_prefix(char *in, char *out, char *srs, int precision, int is_geodetic, const char *prefix)
Definition: cu_out_gml.c:91
Here is the call graph for this function:
Here is the caller graph for this function: