Below is a sample simple GML (Geography Markup Language) file that conforms to the provided XSD schema. This file includes both szop:GranicaRezerwatuPrzyrody and szop:GranicaOtuliny elements, as requested. Each element contains:
- A
nazwa element (a string, as required by the schema).
- A
geometria element of type gml:MultiSurfacePropertyType, which includes at least one polygon (as specified).
- The Coordinate Reference System (CRS) set to EPSG:2180 (PUWG 1992, a Polish national grid system), using the URI
http://www.opengis.net/def/crs/EPSG/0/2180.
To structure the file properly, I've used a <gml:FeatureCollection> as the root element. This is a standard GML approach for grouping multiple features (like szop:GranicaRezerwatuPrzyrody and szop:GranicaOtuliny), which are both substitution groups of gml:AbstractFeature.
Key Details:
- Polygons:
- For
szop:GranicaRezerwatuPrzyrody, I've defined a simple square polygon with arbitrary coordinates in EPSG:2180 (e.g., starting at (100000, 100000) and forming a 1000-unit square).
- For
szop:GranicaOtuliny, I've defined another simple square polygon with different coordinates (e.g., starting at (200000, 200000)).
- gml:id: Each feature and geometry element has a unique
gml:id for identification, as required by GML standards.
- Validation: This file should validate against the provided XSD, as it adheres to the defined structure. You can test it using an XML validator (e.g., in tools like Oxygen XML Editor).
Sample GML File:
<?xml version="1.0" encoding="UTF-8"?>
<gml:FeatureCollection
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:szop="http://geoserwis.gdos.gov.pl/schemas/szop/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://geoserwis.gdos.gov.pl/schemas/szop/1.0 szop.xsd
http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd">
<!-- First feature: GranicaRezerwatuPrzyrody with one polygon -->
<szop:GranicaRezerwatuPrzyrody gml:id="rezervat1">
<szop:nazwa>Sample Nature Reserve</szop:nazwa>
<!-- Geometry: A MultiSurface containing one Polygon -->
<szop:geometria>
<gml:MultiSurface gml:id="ms1" srsName="http://www.opengis.net/def/crs/EPSG/0/2180">
<gml:surfaceMember>
<gml:Polygon gml:id="poly1">
<gml:exterior>
<gml:LinearRing>
<!-- posList: Coordinates for a simple square polygon (e.g., 1000m x 1000m square) -->
<gml:posList>100000.0 100000.0 101000.0 100000.0 101000.0 101000.0 100000.0 101000.0 100000.0 100000.0</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</szop:geometria>
</szop:GranicaRezerwatuPrzyrody>
<!-- Second feature: GranicaOtuliny with one polygon -->
<szop:GranicaOtuliny gml:id="otulina1">
<szop:nazwa>Sample Buffer Zone</szop:nazwa>
<!-- Geometry: A MultiSurface containing one Polygon -->
<szop:geometria>
<gml:MultiSurface gml:id="ms2" srsName="http://www.opengis.net/def/crs/EPSG/0/2180">
<gml:surfaceMember>
<gml:Polygon gml:id="poly2">
<gml:exterior>
<gml:LinearRing>
<!-- posList: Coordinates for another simple square polygon (e.g., 1000m x 1000m square) -->
<gml:posList>200000.0 200000.0 201000.0 200000.0 201000.0 201000.0 200000.0 201000.0 200000.0 200000.0</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</szop:geometria>
</szop:GranicaOtuliny>
</gml:FeatureCollection>