comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL-Python bridge with GDAL/OGR
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL-Python bridge with GDAL/OGR [message #93690 is a reply to message #93689] Fri, 30 September 2016 11:52 Go to previous messageGo to previous message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Friday, September 30, 2016 at 12:21:16 PM UTC-6, Gordon Farquharson wrote:
> OK. I think I figured it out.
>
> IDL> osr.SpatialReference.ImportFromProj4(srs, '+proj=utm +zone=10 +ellps=WGS84 +datum=WGS84 +units=m +no_defs')
> 0
> IDL> osr.SpatialReference.ExportToWkt(srs)
> PROJCS["UTM Zone 10, Northern Hemisphere",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[ "EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG", "8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG ","9108"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator "],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian ",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting ",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
>
> But, I'm confused. Why can't I call methods of the srs object, like one does on Python?
>
> Gordon

Instead of the syntax
IDL> srs = osr.SpatialReference()
what if you try the following?
IDL> srs = osr.SpatialReference

The error message indicates that by calling the object creation, you're getting a reference to the proxy SWIG object instead of a reference the underlying python object.

Just a guess.

Jim P.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: get data points of the contoured image
Next Topic: How to read nc variable partly?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 01:19:39 PDT 2025

Total time taken to generate the page: 0.39454 seconds