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. -- Ho

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 cen

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 vag

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 36.998162346

[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 = "zt04_d

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

2010-11-23 Thread Gregor at HostGIS
on ? [SEC=UNCLASSIFIED] To: "Gregor at HostGIS" Cc: 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).GetGeometryRef()" synta

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

2010-11-23 Thread Gregor at HostGIS
on ? [SEC=UNCLASSIFIED] To: "Gregor at HostGIS" Cc: 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).GetGeometryRef()" synta

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

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

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

2010-11-23 Thread Gregor at HostGIS
Hey all. I am using the OGR binding for python, to open a SHP and print a geometry's WKT. This works until I try to call geom.ExportToWkt() At that time I simply get "Premature end of script headers" Running it from the command line I get a segmentation fault. The code snippet: driver

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] 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 -I/tmp/gdal-1.6

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,

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 tab

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 determi

[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 ODBC/MSSQL

[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 Mi

[gdal-dev] Ticket 3385?

2010-02-22 Thread Gregor at HostGIS
Hey guys. I'd not heard anything about this ticket: http://trac.osgeo.org/gdal/ticket/3385 Is there something I can do to help the process any? I'll cooperate in just about any idea for testing and troubleshooting. -- HostGIS, Open Source solutions for the global GIS community Greg Allensw

[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 a

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

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

2010-02-04 Thread Gregor at HostGIS
Well, some progress. Almost. :) I have upgraded to 1.7.0 and now get a different error: $ ogrinfo ODBC:gregor/mos...@testpgsql table ERROR 2: CPLMalloc(): Out of memory allocating 4294967297 bytes. Yowch, 4 GB seems a bit steep. The PostgreSQL table itself is 5 rows, all points. Why would it w

[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 ***