[Qgis-developer] QGis AutoGCP Plugin

Benoit de Cabissole benoit at exigesa.com
Wed Sep 29 14:02:07 EDT 2010


Thanks Carson.

Power resides with knowledge... I was sure there was a QGIS equivalent!

Benoit

> -----Original Message-----
> From: Carson Farmer [mailto:carson.farmer at gmail.com]
> Sent: Wednesday, 29 September 2010 19:30
> To: benoit at exigesa.com
> Cc: Francois Maass; qgis-developer at lists.osgeo.org
> Subject: Re: [Qgis-developer] QGis AutoGCP Plugin
>
>
> I think this is probably what you're looking for:
>
> crs = QgsCoordinateReferenceSystem ()
> crs.createFromProj4(theProj4Str)
> print crs.toWkt()
>
> no need to use additional libraries or anything!
>
> On 29 September 2010 17:18, Benoit de Cabissole
> <benoit at exigesa.com> wrote:
> > Hi Francois,
> >
> > If you are in Python, you could use GDAL with something like
> the following:
> >
> > import osr
> > ...
> > theProj4Str = "+proj=utm +zone=36 +south +a=6378249.144808011
> > +b=6356514.966204134 +units=m +no_defs"
> > outSr = osr.SpatialReference()
> > outSr.ImportFromProj4(theProj4Str)
> > outWkt = outSr.ExportToWkt()
> >
> > and use outWkt as the 'dst_wtk' parameter for raster creation.
> >
> > HTH,
> > Benoit
> >
> >
> >
> >  -----Original Message-----
> > From: qgis-developer-bounces at lists.osgeo.org
> > [mailto:qgis-developer-bounces at lists.osgeo.org]On Behalf Of
> Francois Maass
> > Sent: Wednesday, 29 September 2010 17:33
> > To: qgis-developer at lists.osgeo.org
> > Subject: [Qgis-developer] QGis AutoGCP Plugin
> >
> > Hello everyone!
> >
> >
> >
> > I’ve been struggling with this for quite some time now, but I
> can’t seem to
> > find the proper solution.  We need to set the projection definition to
> > provided datasets, and have, up to now, been doing it by using our own
> > projection dialog. We now want to change our plugin to use the, already
> > implemented, QGIS projection dialog.
> >
> > So my question is as follows:
> >
> > Is there a way to convert a projection definition such as those
> returned by
> > the QGIS projection dialog
> > eg:
> >    +proj=utm +zone=36 +south +a=6378249.144808011 +b=6356514.966204134
> > +units=m +no_defs
> >
> > to the extended form such as the following:
> >
> >    PROJCS["UTM Zone 36, Southern Hemisphere",GEOGCS["Unknown datum based
> > upon the Clarke 1880 ellipsoid",DATUM["Not specified (based on
> Clarke 1880
> > spheroid)",SPHEROID["Clarke
> >
> 1880",6378249.144808011,293.4663076556303,AUTHORITY["EPSG","7034"]
> ]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJEC
> TION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARA
> METER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARA
> METER["false_easting",500000],PARAMETER["false_northing",10000000]
> ,UNIT["Meter",1]]
> >
> >
> >
> > The reason for this is that the GDAL functions for setting the
> projection
> > definition, only accepts the extended form.  If this is already
> implemented
> > in a QGIS or other class that you know of, I would greatly
> appreciate it.
> > (I don’t think I am qualified enough to attempt doing it myself. J )
> >
> > Thank you for your time and efforts!
> > Francois Maass
> > Foxhat Solutions
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> >
>
>
>
> --
> Carson J. Q. Farmer
> ISSP Doctoral Fellow
> National Centre for Geocomputation
> National University of Ireland, Maynooth,
> http://www.carsonfarmer.com/



More information about the Qgis-developer mailing list