Skip to content

Instantly share code, notes, and snippets.

@oscar9
Created March 30, 2017 14:34
Show Gist options
  • Save oscar9/44c61291c1579ba6849bdeeb7ac634c3 to your computer and use it in GitHub Desktop.
Save oscar9/44c61291c1579ba6849bdeeb7ac634c3 to your computer and use it in GitHub Desktop.
Find crs in gvSIG with CRSFactory #gvSIG
# encoding: utf-8
import gvsig
from org.gvsig.fmap.crs import CRSFactory
from org.cresques.cts import ICRSFactory
def main(*args):
prjcontents="""PROJCS["ED_1950_UTM_Zone_30N",GEOGCS["GCS_European_1950",DATUM["D_European_1950",SPHEROID["International_1924",6378388.0,297.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-3.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]"""
f = CRSFactory.getCRSFactory()
proj = f.get(ICRSFactory.FORMAT_WKT_ESRI, prjcontents)
print proj # Un IProjection de gvSIG.
print proj.getAbrev()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment