PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void out_gml_test_geoms_prefix ( void  )
static

Definition at line 615 of file cu_out_gml.c.

References do_gml2_test_prefix(), and do_gml3_test_prefix().

Referenced by out_gml_suite_setup().

616 {
617  /* GML2 - Linestring */
619  "LINESTRING(0 1,2 3,4 5)",
620  "<custom:LineString><custom:coordinates>0,1 2,3 4,5</custom:coordinates></custom:LineString>",
621  NULL, 0, "custom:");
622 
623  /* GML3 - Linestring */
625  "LINESTRING(0 1,2 3,4 5)",
626  "<custom:Curve><custom:segments><custom:LineStringSegment><custom:posList srsDimension=\"2\">0 1 2 3 4 5</custom:posList></custom:LineStringSegment></custom:segments></custom:Curve>",
627  NULL, 0, 0, "custom:");
628 
629 
630  /* GML2 Polygon */
632  "POLYGON((0 1,2 3,4 5,0 1))",
633  "<custom:Polygon><custom:outerBoundaryIs><custom:LinearRing><custom:coordinates>0,1 2,3 4,5 0,1</custom:coordinates></custom:LinearRing></custom:outerBoundaryIs></custom:Polygon>",
634  NULL, 0, "custom:");
635 
636  /* GML3 Polygon */
638  "POLYGON((0 1,2 3,4 5,0 1))",
639  "<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>",
640  NULL, 0, 0, "custom:");
641 
642 
643  /* GML2 Polygon - with internal ring */
645  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
646  "<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>",
647  NULL, 0, "custom:");
648 
649  /* GML3 Polygon - with internal ring */
651  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
652  "<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>",
653  NULL, 0, 0, "custom:");
654 
655  /* GML3 Triangle */
657  "TRIANGLE((0 1,2 3,4 5,0 1))",
658  "<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>",
659  NULL, 0, 0, "custom:");
660 
661 
662  /* GML2 MultiPoint */
664  "MULTIPOINT(0 1,2 3)",
665  "<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>",
666  NULL, 0, "custom:");
667 
668  /* GML3 MultiPoint */
670  "MULTIPOINT(0 1,2 3)",
671  "<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>",
672  NULL, 0, 0, "custom:");
673 
674 
675  /* GML2 Multiline */
677  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
678  "<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>",
679  NULL, 0, "custom:");
680 
681  /* GML3 Multiline */
683  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
684  "<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>",
685  NULL, 0, 0, "custom:");
686 
687 
688  /* GML2 MultiPolygon */
690  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
691  "<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>",
692  NULL, 0, "custom:");
693 
694  /* GML3 MultiPolygon */
696  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
697  "<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>",
698  NULL, 0, 0, "custom:");
699 
700  /* GML3 PolyhedralSurface */
702  "POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
703  "<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>",
704  NULL, 0, 0, "custom:");
705 
706  /* GML3 Tin */
708  "TIN(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
709  "<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>",
710  NULL, 0, 0, "custom:");
711 
712  /* GML2 - GeometryCollection */
714  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
715  "<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>",
716  NULL, 0, "custom:");
717 
718  /* GML3 - GeometryCollection */
720  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
721  "<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>",
722  NULL, 0, 0, "custom:");
723 
724  /* GML2 - Nested GeometryCollection */
726  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
727  "<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>",
728  NULL, 0, "custom:");
729 
730  /* GML3 - Nested GeometryCollection */
732  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
733  "<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>",
734  NULL, 0, 0, "custom:");
735 
736  /*------------- empty prefixes below ------------------------ */
737 
738  /* GML2 - Linestring */
740  "LINESTRING(0 1,2 3,4 5)",
741  "<LineString><coordinates>0,1 2,3 4,5</coordinates></LineString>",
742  NULL, 0, "");
743 
744  /* GML3 - Linestring */
746  "LINESTRING(0 1,2 3,4 5)",
747  "<Curve><segments><LineStringSegment><posList srsDimension=\"2\">0 1 2 3 4 5</posList></LineStringSegment></segments></Curve>",
748  NULL, 0, 0, "");
749 
750 
751  /* GML2 Polygon */
753  "POLYGON((0 1,2 3,4 5,0 1))",
754  "<Polygon><outerBoundaryIs><LinearRing><coordinates>0,1 2,3 4,5 0,1</coordinates></LinearRing></outerBoundaryIs></Polygon>",
755  NULL, 0, "");
756 
757  /* GML3 Polygon */
759  "POLYGON((0 1,2 3,4 5,0 1))",
760  "<Polygon><exterior><LinearRing><posList srsDimension=\"2\">0 1 2 3 4 5 0 1</posList></LinearRing></exterior></Polygon>",
761  NULL, 0, 0, "");
762 
763 
764  /* GML2 Polygon - with internal ring */
766  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
767  "<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>",
768  NULL, 0, "");
769 
770  /* GML3 Polygon - with internal ring */
772  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
773  "<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>",
774  NULL, 0, 0, "");
775 
776  /* GML3 Triangle */
778  "TRIANGLE((0 1,2 3,4 5,0 1))",
779  "<Triangle><exterior><LinearRing><posList srsDimension=\"2\">0 1 2 3 4 5 0 1</posList></LinearRing></exterior></Triangle>",
780  NULL, 0, 0, "");
781 
782 
783  /* GML2 MultiPoint */
785  "MULTIPOINT(0 1,2 3)",
786  "<MultiPoint><pointMember><Point><coordinates>0,1</coordinates></Point></pointMember><pointMember><Point><coordinates>2,3</coordinates></Point></pointMember></MultiPoint>",
787  NULL, 0, "");
788 
789  /* GML3 MultiPoint */
791  "MULTIPOINT(0 1,2 3)",
792  "<MultiPoint><pointMember><Point><pos srsDimension=\"2\">0 1</pos></Point></pointMember><pointMember><Point><pos srsDimension=\"2\">2 3</pos></Point></pointMember></MultiPoint>",
793  NULL, 0, 0, "");
794 
795 
796  /* GML2 Multiline */
798  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
799  "<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>",
800  NULL, 0, "");
801 
802  /* GML3 Multiline */
804  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
805  "<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>",
806  NULL, 0, 0, "");
807 
808 
809  /* GML2 MultiPolygon */
811  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
812  "<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>",
813  NULL, 0, "");
814 
815  /* GML3 MultiPolygon */
817  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
818  "<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>",
819  NULL, 0, 0, "");
820 
821  /* GML3 PolyhedralSurface */
823  "POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
824  "<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>",
825  NULL, 0, 0, "");
826 
827  /* GML3 PolyhedralSurface */
829  "TIN(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
830  "<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>",
831  NULL, 0, 0, "");
832 
833  /* GML2 - GeometryCollection */
835  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
836  "<MultiGeometry><geometryMember><Point><coordinates>0,1</coordinates></Point></geometryMember><geometryMember><LineString><coordinates>2,3 4,5</coordinates></LineString></geometryMember></MultiGeometry>",
837  NULL, 0, "");
838 
839  /* GML3 - GeometryCollection */
841  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
842  "<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>",
843  NULL, 0, 0, "");
844 
845  /* GML2 - Nested GeometryCollection */
847  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
848  "<MultiGeometry><geometryMember><Point><coordinates>0,1</coordinates></Point></geometryMember><geometryMember><MultiGeometry><geometryMember><LineString><coordinates>2,3 4,5</coordinates></LineString></geometryMember></MultiGeometry></geometryMember></MultiGeometry>",
849  NULL, 0, "");
850 
851  /* GML3 - Nested GeometryCollection */
853  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
854  "<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>",
855  NULL, 0, 0, "");
856 
857 
858 
859 }
static void do_gml2_test_prefix(char *in, char *out, char *srs, int precision, const char *prefix)
Definition: cu_out_gml.c:39
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:92

Here is the call graph for this function:

Here is the caller graph for this function: