I have been able to parse a GML file and fetch the polygons I wanted. They can be plotted ok when plotted on their own. I have them stored in a
GeoPandas data frame, but I am struggling to set the proper CRS
to be able to use this data along with other data frames in a consistent manner.
Each feature is like this
<omi:OMIFeature>
<omi:title>MyTitle</omi:title>
<omi:description>Descr</omi:description>
<omi:linkzona></omi:linkzona>
<gml:MultiSurface srsName="GEOPOIUTM32.5" srsDimension="2">
<gml:surfaceMember>
<gml:Polygon>
<gml:exterior>
<gml:LinearRing>
<gml:pos>520381.7 4648450.2</gml:pos>
<gml:pos>520435.9 4648293.8</gml:pos>
<gml:pos>520450.9 4648243.6</gml:pos>
... more positions like this
The specification of the CRS seems to be a custom one named GEOPOIUTM32.5
I did find a dictionary that seems to describe in full this coordinates reference system, but I am afraid I am not able to use this info. What info should I pick here and use it to set the CRS of this data frame with set_crs()
? (I have tried 6402, 7030,4326 as EPSG
but they give oddly placed results or not plot anything at all. I figured that 32633 gives x coordinate off by a huge amount, but y is nearly right).
<gml:Dictionary gml:id="OMI_Dictionary">
<gml:description>Dictionary description</gml:description>
<gml:name>Dictionary name</gml:name>
<gml:dictionaryEntry>
<gml:ProjectedCRS gml:id="ogrcrs104">
<gml:srsName>GEOPOI / UTM zone 32.5</gml:srsName>
<gml:srsID>
<gml:name>GEOPOIUTM32.5</gml:name>
</gml:srsID>
<gml:baseCRS>
<gml:GeographicCRS gml:id="ogrcrs105">
<gml:srsName>WGS 84</gml:srsName>
<gml:srsID>
<gml:name>4326</gml:name>
</gml:srsID>
<gml:usesEllipsoidalCS>
<gml:EllipsoidalCS gml:id="ogrcrs106">
<gml:csName>ellipsoidal</gml:csName>
<gml:csID>
<gml:name>6402</gml:name>
</gml:csID>
<gml:usesAxis>
<gml:CoordinateSystemAxis gml:id="ogrcrs107" gml:uom="urn:ogc:def:uom:EPSG::9102">
<gml:name>Geodetic latitude</gml:name>
<gml:axisID>
<gml:name>9901</gml:name>
</gml:axisID>
<gml:axisAbbrev>Lat</gml:axisAbbrev>
<gml:axisDirection>north</gml:axisDirection>
</gml:CoordinateSystemAxis>
</gml:usesAxis>
<gml:usesAxis>
<gml:CoordinateSystemAxis gml:id="ogrcrs108" gml:uom="urn:ogc:def:uom:EPSG::9102">
<gml:name>Geodetic longitude</gml:name>
<gml:axisID>
<gml:name>9902</gml:name>
</gml:axisID>
<gml:axisAbbrev>Lon</gml:axisAbbrev>
<gml:axisDirection>east</gml:axisDirection>
</gml:CoordinateSystemAxis>
</gml:usesAxis>
</gml:EllipsoidalCS>
</gml:usesEllipsoidalCS>
<gml:usesGeodeticDatum>
<gml:GeodeticDatum gml:id="ogrcrs109">
<gml:datumName>WGS_1984</gml:datumName>
<gml:datumID>
<gml:name>6326</gml:name>
</gml:datumID>
<gml:usesPrimeMeridian>
<gml:PrimeMeridian gml:id="ogrcrs110">
<gml:meridianName>Greenwich</gml:meridianName>
<gml:meridianID>
<gml:name>8901</gml:name>
</gml:meridianID>
<gml:greenwichLongitude>
<gml:angle uom="urn:ogc:def:uom:EPSG::9102">0</gml:angle>
</gml:greenwichLongitude>
</gml:PrimeMeridian>
</gml:usesPrimeMeridian>
<gml:usesEllipsoid>
<gml:Ellipsoid gml:id="ogrcrs111">
<gml:ellipsoidName>WGS 84</gml:ellipsoidName>
<gml:ellipsoidID>
<gml:name>7030</gml:name>
</gml:ellipsoidID>
<gml:semiMajorAxis uom="urn:ogc:def:uom:EPSG::9001">6378137</gml:semiMajorAxis>
<gml:secondDefiningParameter>
<gml:inverseFlattening uom="urn:ogc:def:uom:EPSG::9201">298.257223563</gml:inverseFlattening>
</gml:secondDefiningParameter>
</gml:Ellipsoid>
</gml:usesEllipsoid>
</gml:GeodeticDatum>
</gml:usesGeodeticDatum>
</gml:GeographicCRS>
</gml:baseCRS>
<gml:definedByConversion>
<gml:Conversion gml:id="ogrcrs112">
<gml:coordinateOperationName></gml:coordinateOperationName>
<gml:usesMethod xlink:href="urn:ogc:def:method:EPSG::9807"/>
<gml:usesValue>
<gml:value uom="urn:ogc:def:uom:EPSG::9102">0</gml:value>
<gml:valueOfParameter xlink:href="urn:ogc:def:parameter:EPSG::8801"/>
</gml:usesValue>
<gml:usesValue>
<gml:value uom="urn:ogc:def:uom:EPSG::9102">12</gml:value>
<gml:valueOfParameter xlink:href="urn:ogc:def:parameter:EPSG::8802"/>
</gml:usesValue>
<gml:usesValue>
<gml:value uom="urn:ogc:def:uom:EPSG::9001">0.9996</gml:value>
<gml:valueOfParameter xlink:href="urn:ogc:def:parameter:EPSG::8805"/>
</gml:usesValue>
<gml:usesValue>
<gml:value uom="urn:ogc:def:uom:EPSG::9001">500000</gml:value>
<gml:valueOfParameter xlink:href="urn:ogc:def:parameter:EPSG::8806"/>
</gml:usesValue>
<gml:usesValue>
<gml:value uom="urn:ogc:def:uom:EPSG::9001">0</gml:value>
<gml:valueOfParameter xlink:href="urn:ogc:def:parameter:EPSG::8807"/>
</gml:usesValue>
</gml:Conversion>
</gml:definedByConversion>
<gml:usesCartesianCS>
<gml:CartesianCS gml:id="ogrcrs113">
<gml:csName>Cartesian</gml:csName>
<gml:csID>
<gml:name>4400</gml:name>
</gml:csID>
<gml:usesAxis>
<gml:CoordinateSystemAxis gml:id="ogrcrs114" gml:uom="urn:ogc:def:uom:EPSG::9001">
<gml:name>Easting</gml:name>
<gml:axisID>
<gml:name>9906</gml:name>
</gml:axisID>
<gml:axisAbbrev>E</gml:axisAbbrev>
<gml:axisDirection>east</gml:axisDirection>
</gml:CoordinateSystemAxis>
</gml:usesAxis>
<gml:usesAxis>
<gml:CoordinateSystemAxis gml:id="ogrcrs115" gml:uom="urn:ogc:def:uom:EPSG::9001">
<gml:name>Northing</gml:name>
<gml:axisID>
<gml:name>9907</gml:name>
</gml:axisID>
<gml:axisAbbrev>N</gml:axisAbbrev>
<gml:axisDirection>north</gml:axisDirection>
</gml:CoordinateSystemAxis>
</gml:usesAxis>
</gml:CartesianCS>
</gml:usesCartesianCS>
</gml:ProjectedCRS>
</gml:dictionaryEntry>
</gml:Dictionary>
+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_0=0 +datum=WGS84 +units=m +no_defs
or with a WKT, take any one of the WGS84 UTM Zones' WKT and change the central_meridian to 12.<gml:definedByConversion>
tag. The part preceding it seems to be a definition of a "starting" CRS given in<gml:baseCRS>
. The starting one is the EPSG 4326 which is like the proj string+proj=longlat +datum=WGS84 +no_defs
. This can be obtained at the link for 4326. Some part of the "base" is not clear to me why is referred to as6402
or9901
or9902
as these, unlike 4326, are not EPSG specifications for a full CRS, they seem to be related to definition of the rotational ellipsoid.