<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br><br><div>> Date: Fri, 9 Dec 2011 22:39:49 +0100<br>> From: jachym.cepicky@gmail.com<br>> To: owslib-users@lists.sourceforge.net<br>> Subject: [owslib-users] parsing of coordinate systems in owslib<br>> <br>> -----BEGIN PGP SIGNED MESSAGE-----<br>> Hash: SHA1<br>> <br>> Hi,<br>> <br>> is there some generic coordinate reference system parser, which would<br>> parse the "authority:...:number" string (usually something like<br>> "EPSG:4326" and convert it into e.g. pyproj.Proj or<br>> osgeo.osr.SpatialReference (not sure, which one would be better).<br>> <br>> To identify the epsg, as used in WCS or WMS is in general no problem,<br>> but WFS uses much more complicated syntax:<br>> <br>> (WFS 1.1.0, page 36)<br>> <br>> * EPSG:<EPSG code><br>> * http://www.opengis.net/gml/srs/epsg.xml#<EPSG code><br>> * urn:EPSG:geographicCRC:<epsg code><br>> <br>> So, is there some SCRS parser in OWSLib?<br>> <br>> Thanks<br>> <br>> Jachym<br><br>Hi Jachym: thanks for the info.  Timely enough, this has been added to trunk recently (see http://sourceforge.net/apps/trac/owslib/ticket/19).<br><br>So typical usage would be:<br><br>from owslib import crs<br><br>c=crs.Crs('EPSG:4326')<br><br>All three types of CRS definitions are handled, as well as axis order for CRS URNs.  owslib/crs.py just parses the definition, and leaves it up to the caller to init a given projection library.<br><br>You can see how this is implemented in pycsw (http://sourceforge.net/apps/trac/pycsw/browser/trunk/server/gml.py#L57 and http://sourceforge.net/apps/trac/pycsw/browser/trunk/server/gml.py#L162).<br><br>Let us know if this works for you.<br><br>..Tom<br><br></div>                                    </div></body>
</html>