[GRASS-dev] Dead code

Pietro peter.zamb at gmail.com
Thu Oct 30 03:38:53 PDT 2014


On Thu, Oct 30, 2014 at 10:49 AM, Markus Neteler wrote:
> On Thu, Oct 30, 2014 at 8:40 AM, Glynn Clements wrote:
>> Are the replacements sufficient? g.setproj had a lot of logic for
>> dealing with the relationships between various parameters. Has that
>> been incorporated into the GUI? Is it unnecessary? Or does everyone
>> just use EPSG codes now?
>
> No, EPSG codes do not represent all. Especially since we still need to
> update the CSV files included in lib/proj/ which are pretty dated now.
> See README.txt therein for a better approach.

If the connection is available why not retrieve these information
directly from the web?
something like:

{{{
In [1]: import urllib2

In [2]: def get_epsg_wkt(epsg):
   ...:     response =
urllib2.urlopen('http://epsg.io/{epsg}.wkt'.format(epsg=epsg))
   ...:     return response.read()
   ...:

In [3]: print(get_epsg_wkt(3003))
PROJCS["Monte Mario / Italy zone 1",GEOGCS["Monte
Mario",DATUM["Monte_Mario",SPHEROID["International
1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","3003"]]
}}}


More information about the grass-dev mailing list