Re: [gdal-dev] Python geometry.Transform() returns code 6

2010-12-09 Thread Gregor at HostGIS
On 12/9/2010 12:34 AM, Paolo Corti wrote: dataset/feature geometry: could you kindly provide the wkt of the geometry that is failing (print geom.ExportToWkt()) ? Sure. It's a zip code area for Arizona, just some SHP I grabbed off National Atlas. POLYGON ((-110.347639068730317

Re: [gdal-dev] Python geometry.Transform() returns code 6

2010-12-09 Thread Gregor at HostGIS
IIRC, older versions of the bindings silenced error messages to stdout but didn't throw exceptions by default. Gregor might try issuing 'osr.UseExceptions()' Ah, good advice hobu. I had set ogr.UseExceptions() in my real code, but not osr's version. The resulting error is slightly less

Re: [gdal-dev] Python geometry.Transform() returns code 6

2010-12-09 Thread Gregor at HostGIS
On 12/9/2010 9:08 AM, Frank Warmerdam wrote: ERROR 1: latitude or longitude exceeded limits I'm not sure why you did not see the error message I am seeing. No idea here. Maybe an older version of this or that? I believe the problem is that your data (-110 longitude) is no where near the

Re: [gdal-dev] basic gdal_translate question

2010-12-09 Thread Gregor at HostGIS
I would like it to output in degrees. If there an option I can specify on gdal_translate to put it in degrees? Or is there another utility such as gdalwarp which will do the conversion. You said it: gdalwarp is how you would reproject a image to a different SRS, say from UTM to lon-lat. --

[gdal-dev] Python geometry.Transform() returns code 6

2010-12-08 Thread Gregor at HostGIS
Hey all. I am having a problem with the geometry.Transform() method in OGR for Python. Short version: geometry.Transform() returns a code 6. A code 6, according to the OGR source is simply OGRERROR II guess the rest is best explained by example: from osgeo import ogr, osr shapefile =

Re: [gdal-dev] Unable to use geom.ExportToWkt() in Python ?

2010-11-23 Thread Gregor at HostGIS
from the geometry type and iterating over the vertices? Sent from my Verizon Wireless Phone - Reply message - From: Frank Warmerdam warmer...@pobox.com Date: Tue, Nov 23, 2010 6:31 pm Subject: [gdal-dev] Unable to use geom.ExportToWkt() in Python ? To: Gregor at HostGIS gre...@hostgis.com

Re: [gdal-dev] Unable to use geom.ExportToWkt() in Python ? [SEC=UNCLASSIFIED]

2010-11-23 Thread Gregor at HostGIS
geom.ExportToWkt() in Python ? [SEC=UNCLASSIFIED] To: Gregor at HostGIS gre...@hostgis.com Cc: gdal-dev@lists.osgeo.org You are running into a python gotcha - http://trac.osgeo.org/gdal/wiki/PythonGotchas Your reference to the feature is going out of scope when you use the firstgeom = layer.GetFeature(0

[gdal-dev] Java SWIG won't build

2010-08-17 Thread Gregor at HostGIS
Hey guys. I'm trying to build the Java SWIG wrapper on GDAL 1.6.4 I get this. Any ideas? $ make build mkdir -p org/gdal/gdal mkdir -p org/gdal/gdalconst mkdir -p org/gdal/ogr mkdir -p org/gdal/osr g++ -fPIC -fPIC -D_FILE_OFFSET_BITS=64 -fPIC -Wall -Wdeclaration-after-statement

Re: [gdal-dev] Java SWIG won't build

2010-08-17 Thread Gregor at HostGIS
Funny; after the email came back to me the reply was right at the middle of the screen: SetMetadataItem() was defined twice. No idea why this was, but I removed the second and it built. -- HostGIS, Open Source solutions for the global GIS community Greg Allensworth - SysAdmin, Programmer, GIS

[gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-24 Thread Gregor at HostGIS
Hey guys. I posted a few days ago about a problem with using ogrinfo to read ODBC from a MS SQL server. $ ogrinfo test.ovf ERROR 1: No column definitions found for table '�o��y.����y', layer not usable. (... and so on, more binary table names ...) I can connect to the

Re: [gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-24 Thread Gregor at HostGIS
Frank Warmerdam wrote: Debuging MS SQL related bugs isn't really all that convenient for me Ha ha! I myself rank any dealing with MS SQL on par with cleaning the Augean Stables. I understand. :) You could add some debug statements in the gdal/port/cpl_odbc.cpp code in an attempt to

Re: [gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-24 Thread Gregor at HostGIS
Hey, this is so excellent. I took Frank's advice about just trying to hack the C++ code... and discovered as a side effect that FreeTDS has a new release. This new release fixed the issue. Ha! I do have one outstanding issue, though: it is very, very, very, very slow because it scans every

Re: [gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-24 Thread Gregor at HostGIS
From the docs: Hey, how'd you know about that fix I found? Oh right, you invented it. :) Thanks a million, Frank -- you're worth twice your weight in gold. Even just telling me to go hack it myself, actually got the job done, and I learned a bit about the internals of OGR+ODBC. -- HostGIS,

[gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-22 Thread Gregor at HostGIS
Hey guys. A few weeks back, Chaitanya helped us out with some fixes regarding unixODBC on 64-bit platforms, and got MapServer able to render remote data via ODBC from PostgreSQL and MySQL. Thanks a million! Now we're on the last step: getting OGR data sources to work when the ODBC server is

[gdal-dev] A palette for gdaldem color relief?

2010-02-18 Thread Gregor at HostGIS
Hey guys. Does anyone have a good palette for use with gdaldem's colorrelief mode? I have a tough time with colors, and figure that somebody has already put together a nice green-brown-white set of colors. The spatial region is New Zealand, so it's land with surrounding sea, a lot of low

Re: [gdal-dev] ODBC as OGR data source?

2010-02-04 Thread Gregor at HostGIS
Thanks, Kumar, for all your help. I have filed a ticket, #3385 -- HostGIS, Open Source solutions for the global GIS community Greg Allensworth - SysAdmin, Programmer, GIS Person, Security Network+ Server+ A+ Security+ Linux+ PHP PostgreSQL MySQL DHTML/JavaScript/AJAX No one

[gdal-dev] ODBC as OGR data source?

2010-02-03 Thread Gregor at HostGIS
Hey all. I've been asked to set up support for pseudo-spatial data via ODBC. So far, I've not had any luck. We're using this as our starting point: http://mapserver.org/input/vector/VirtualSpatialData.html But I get this... $ ogrinfo ODBC:gregor/mos...@testpgsql table *** glibc detected ***