#541610 - 09/07/06 10:08 AM
Re: A new tool for creating Region-based KML
[Re: regionator]
|
Traveler
Registered: 03/31/05
Posts: 14
Loc: Spanish Fork, Utah
|
A non-programmer having some trouble getting regionator to work: We're running under windows (not CygWin), which may be part of the trouble, and python 2.4, GDAL, and numpy seem to be installed and working. The tests in the test folder all worked without a hitch. [ImageMagick was only needed for the image tests, not for regionator in general, right?] However, whenever we try to run a script that opens an image (like superoverlay.py or testextractor.py), we get the following:
self.__in_ds = gdal.Open(imgfile) AtrributeError: 'module' object has no attribute 'Open'
My guess is that this is an installation snafu, not a bug in the program. Any ideas?
|
|
Top
|
|
|
|
#541611 - 09/07/06 09:32 PM
Re: A new tool for creating Region-based KML
[Re: bplewe]
|
The Crusader
Registered: 01/24/06
Posts: 65
|
Sounds like a problem with the installation of gdal or the gdal python bindings.
A quick first test of just gdal's python installation might be to start python interactively and enter the following lines manually. This presumes 'screeno01.jpg' exists (yes, ImageMagick is only to create these files for other tests and is not needed for creating a superoverlay). Obviously if you use a different image file the x,y values may be different.
>>> import gdal >>> ds = gdal.Open('screeno01.jpg') >>> print ds.RasterXSize 32 >>> print print ds.RasterYSize 32
|
|
Top
|
|
|
|
#541613 - 10/06/06 10:45 AM
Re: A new tool for creating Region-based KML
[Re: bplewe]
|
Traveler
Registered: 10/05/06
Posts: 6
|
Hi All, I am having similar problems on Windows, I'm keen to try regionator. Anyone willing to help me? I am a newbie on Python and GDAL, all my imagery is on a Novell network and my sysman only allows logins from our Windows machines, so Windows is my only useful option for this work. I've got FWTools installed, which I think means GDAL is installed somehow as well, and have also put GDAL 1.3.2 in a couple other places, all of which are indicated on PYTHONPATH.
However, when I try and run any of the image based test scripts or the superoverlay.py script I am told:
C:\temp\subversion\build\scripts-2.5>superoverlay.py Traceback (most recent call last): File "C:\temp\subversion\build\scripts-2.5\superoverlay.py", line 28, in <module> import kml.superoverlay File "C:\Python25\Lib\site-packages\kml\superoverlay.py", line 27, in <module>
import kml.image File "C:\Python25\Lib\site-packages\kml\image.py", line 25, in <module> import gdal File "C:\gdal-1.3.2\pymod\gdal.py", line 191, in <module> import _gdal ImportError: No module named _gdal
Anyone know what to do? Got any help? Anything at all?
Thanks, Lars
|
|
Top
|
|
|
|
#541614 - 10/08/06 10:47 PM
Re: A new tool for creating Region-based KML
[Re: vestigialars]
|
The Crusader
Registered: 01/24/06
Posts: 65
|
Python isn't finding gdal. To more directly debug this start python interactively and enter "import gdal". Once that works the regionator code which uses gdal will also work.
Also fwtools includes its own fairly old python so watch you might want to be mindful of mixing different python installations.
|
|
Top
|
|
|
|
#541615 - 10/12/06 06:40 PM
Re: A new tool for creating Region-based KML
[Re: regionator]
|
Traveler
Registered: 10/05/06
Posts: 6
|
Okay, gave up on the windows version. My gdal says it is fine but the _gdal is throwing everything off. I am probably missing something simple but can't figure it out right now.
Happily, I have it running on a linux box and it seems to be working. So far so good, thanks!
Lars
|
|
Top
|
|
|
|
#541616 - 10/17/06 06:43 PM
Re: A new tool for creating Region-based KML
[Re: regionator]
|
Traveler
Registered: 10/05/06
Posts: 6
|
Hi All, me again.
Any advice on how to improve the output image quality from regionator? I am using it on large high-res imagery showing small villages in Darfur. The output JPEGs are downsampled to a certain extent and I lose some quality overall. Not a lot, but enough that I notice. Any quick fix?
Also, at some point I ran regionator and it produced PNGs. Why did that happen, and do I have control over it?
Thanks for any tips...
|
|
Top
|
|
|
|
#541617 - 10/20/06 08:46 PM
Re: A new tool for creating Region-based KML
[Re: regionator]
|
Traveler
Registered: 02/03/05
Posts: 14
|
I have been trying to get the "regionator" to output my files as PNG's only. I have found the image.py and extractor.py as possible culprits for automatically choosing my output files but have not successfully edited those files to do what I want.
Has anybody changed these files so that only PNG's are produced, it seems I am only able to create GTiff output files.
|
|
Top
|
|
|
|
#541618 - 10/20/06 09:00 PM
Re: A new tool for creating Region-based KML
[Re: pawill79]
|
Traveler
Registered: 02/03/05
Posts: 14
|
Ok, I figured this one out. Forgot to recompile the regionator after making changes to the extractor.py and image.py files.
|
|
Top
|
|
|
|
Moderator: BeadieJay, bebop, Cyclonic, Delta102, dulce, esterrett, Frank_McVey, Hill, jeffryv, Jumble, Kempster, LuciaM, marinerfan, Noisette, NormB, no_stranger, tekgergedan, TheLedge
|
|