[kepler-dev] [kepler-users] GDAL format Translator Crashes my workflow
Chad Berkley
berkley at nceas.ucsb.edu
Thu Apr 3 09:22:03 PDT 2008
Hi Niels,
I have a feeling that this has to do with the version of the gdal DLL
(or SO) that we've included with kepler. It may take some recompilation
to fix it. I'll enter a bug and target it at 1.0 and see if I can get
it fixed by the release. Sorry for all the problems.
As a temporary work-around, you could use the commandLineExec actor to
run gdal_translate. That will allow you just to run gdal_translate on
the command line and get it's output via file I/O. Not a perfect
solution, but it should work until I can figure out what's wrong with
the gdal actor.
chad
Niels Hoffmann wrote:
> Hi Chad,
>
> Type gdal_translate --formats to see which formats are supported by the
> gdal build you've got. I suspect it won't have WMS as supported format...
> Depending on the options you supply when building GDAL you can have
> different formats supported.
>
> My gdal_translate --formats shows the following list:
> C:\Program Files\Kepler\lib>gdal_translate --formats
> Supported Formats:
> VRT (rw+): Virtual Raster
> GTiff (rw+): GeoTIFF
> NITF (rw+): National Imagery Transmission Format
> RPFTOC (ro): Raster Product Format TOC format
> HFA (rw+): Erdas Imagine Images (.img)
> SAR_CEOS (ro): CEOS SAR Image
> CEOS (ro): CEOS Image
> JAXAPALSAR (ro): JAXA PALSAR Product Reader (Level 1.1/1.5)
> GFF (ro): Ground-based SAR Applications Testbed File Format (.gff)
> ELAS (rw+): ELAS
> AIG (ro): Arc/Info Binary Grid
> AAIGrid (rw): Arc/Info ASCII Grid
> SDTS (ro): SDTS Raster
> DTED (rw): DTED Elevation Raster
> PNG (rw): Portable Network Graphics
> JPEG (rw): JPEG JFIF
> MEM (rw+): In Memory Raster
> JDEM (ro): Japanese DEM (.mem)
> GIF (rw): Graphics Interchange Format (.gif)
> ESAT (ro): Envisat Image Format
> BSB (ro): Maptech BSB Nautical Charts
> XPM (rw): X11 PixMap Format
> BMP (rw+): MS Windows Device Independent Bitmap
> DIMAP (ro): SPOT DIMAP
> AirSAR (ro): AirSAR Polarimetric Image
> RS2 (ro): RadarSat 2 XML Product
> PCIDSK (rw+): PCIDSK Database File
> PCRaster (rw): PCRaster Raster File
> ILWIS (rw+): ILWIS Raster Map
> SGI (ro): SGI Image File Format 1.0
> SRTMHGT (rw): SRTMHGT File Format
> Leveller (rw+): Leveller heightfield
> Terragen (rw+): Terragen heightfield
> PNM (rw+): Portable Pixmap Format (netpbm)
> DOQ1 (ro): USGS DOQ (Old Style)
> DOQ2 (ro): USGS DOQ (New Style)
> ENVI (rw+): ENVI .hdr Labelled
> EHdr (rw+): ESRI .hdr Labelled
> GenBin (ro): Generic Binary (.hdr Labelled)
> PAux (rw+): PCI .aux Labelled
> MFF (rw+): Vexcel MFF Raster
> MFF2 (rw+): Vexcel MFF2 (HKV) Raster
> FujiBAS (ro): Fuji BAS Scanner Image
> GSC (ro): GSC Geogrid
> FAST (ro): EOSAT FAST Format
> BT (rw+): VTP .bt (Binary Terrain) 1.3 Format
> LAN (ro): Erdas .LAN/.GIS
> CPG (ro): Convair PolGASP
> IDA (rw+): Image Data and Analysis
> NDF (ro): NLAPS Data Format
> DIPEx (ro): DIPEx
> ISIS3 (ro): USGS Astrogeology ISIS cube (Version 3)
> ISIS2 (ro): USGS Astrogeology ISIS cube (Version 2)
> PDS (ro): NASA Planetary Data System
> ERS (rw+): ERMapper .ers Labelled
> L1B (ro): NOAA Polar Orbiter Level 1b Data Set
> FIT (rw): FIT Image
> RMF (rw+): Raster Matrix Format
> WCS (ro): OGC Web Coverage Service
> *WMS (ro): OGC Web Map Service
> * MSGN (ro): EUMETSAT Archive native (.nat)
> RST (rw+): Idrisi Raster A.1
> INGR (rw+): Intergraph Raster
> GSAG (rw+): Golden Software ASCII Grid (.grd)
> GSBG (rw+): Golden Software Binary Grid (.grd)
> GS7BG (ro): Golden Software 7 Binary Grid (.grd)
> COSAR (ro): COSAR Annotated Binary Matrix (TerraSAR-X)
> TSX (ro): TerraSAR-X Product
> COASP (ro): DRDC COASP SAR Processor Raster
> RIK (ro): Swedish Grid RIK (.rik)
> USGSDEM (rw): USGS Optional ASCII DEM (and CDED)
> GXF (ro): GeoSoft Grid Exchange Format
> HTTP (ro): HTTP Fetching Wrapper
> ADRG (rw+): ARC Digitized Raster Graphics
>
>
> In the meantime I also installed Kepler on a Fedora Core 5 linux box
> It has GDAL 1.5.0 installed with WMS support, so the commandline
> gdal_translate works.
> But Kepler fails (doesn't crash) with:
> ptolemy.kernel.util.IllegalActionException: in
> .test_gdal_translate.manager
> Stack Trace:
> /home/slpu/Kepler/lib/libgdalactor.so:
> /home/slpu/Kepler/lib/libgdalactor.so: undefined symbol:
> _ZN19OGRSpatialReference11exportToWktEPPc
> at ptolemy.actor.Manager.execute(Manager.java:446)
> at ptolemy.actor.Manager.run(Manager.java:1071)
> at ptolemy.actor.Manager$3.run(Manager.java:1112)
> Caused by: java.lang.UnsatisfiedLinkError:
> /home/slpu/Kepler/lib/libgdalactor.so:
> /home/slpu/Kepler/lib/libgdalactor.so: undefined symbol:
> _ZN19OGRSpatialReference11exportToWktEPPc
> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
> at java.lang.Runtime.loadLibrary0(Runtime.java:822)
> at java.lang.System.loadLibrary(System.java:993)
> at
> org.ecoinformatics.seek.gis.gdal.GDALJniGlue.<clinit>(GDALJniGlue.java:66)
> at
> org.ecoinformatics.seek.gis.gdal.GDALTranslateActor.fire(GDALTranslateActor.java:226)
> at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:398)
> at
> ptolemy.actor.sched.StaticSchedulingDirector.fire(StaticSchedulingDirector.java:170)
> at ptolemy.actor.CompositeActor.fire(CompositeActor.java:400)
> at ptolemy.actor.Manager.iterate(Manager.java:688)
> at ptolemy.actor.Manager.execute(Manager.java:332)
> ... 2 more
> Caused by: java.lang.UnsatisfiedLinkError:
> /home/slpu/Kepler/lib/libgdalactor.so:
> /home/slpu/Kepler/lib/libgdalactor.so: undefined symbol:
> _ZN19OGRSpatialReference11exportToWktEPPc
> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
> at java.lang.Runtime.loadLibrary0(Runtime.java:822)
> at java.lang.System.loadLibrary(System.java:993)
> at
> org.ecoinformatics.seek.gis.gdal.GDALJniGlue.<clinit>(GDALJniGlue.java:66)
> at
> org.ecoinformatics.seek.gis.gdal.GDALTranslateActor.fire(GDALTranslateActor.java:226)
> at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:398)
> at
> ptolemy.actor.sched.StaticSchedulingDirector.fire(StaticSchedulingDirector.java:170)
> at ptolemy.actor.CompositeActor.fire(CompositeActor.java:400)
> at ptolemy.actor.Manager.iterate(Manager.java:688)
> at ptolemy.actor.Manager.execute(Manager.java:332)
> at ptolemy.actor.Manager.run(Manager.java:1071)
> at ptolemy.actor.Manager$3.run(Manager.java:1112)
>
> I then decided to try converting from another format (jpg) to GTiff on
> my windows box and that resulted in the following error:
> ptolemy.kernel.util.IllegalActionException: Error running jni code for
> GDAL: null
> at
> org.ecoinformatics.seek.gis.gdal.GDALTranslateActor.fire(GDALTranslateActor.java:254)
> at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:398)
> at
> ptolemy.actor.sched.StaticSchedulingDirector.fire(StaticSchedulingDirector.java:170)
> at ptolemy.actor.CompositeActor.fire(CompositeActor.java:400)
> at ptolemy.actor.Manager.iterate(Manager.java:688)
> at ptolemy.actor.Manager.execute(Manager.java:332)
> at ptolemy.actor.Manager.run(Manager.java:1071)
> at ptolemy.actor.Manager$3.run(Manager.java:1112)
> I also installed Kepler on another WinXP box with no GDAL installation
> and that shows the same symptoms=> crashes on the wms.xml and a jni
> error for the jpg file.
>
> I hope you can make some sense out of this...
>
> Cheers, Niels
>
> >>> Chad Berkley <berkley at nceas.ucsb.edu> 3/04/2008 6:03 a.m. >>>
> Hi Niels,
>
> After looking into this more, I think the actor should work as you
> describe. When I run your workflow, I get the error:
>
> ERROR 4: `/home/berkley/tmp/gdal_wms.xml' not recognised as a supported
> file format.
> [java]
> [java] GDALOpen failed - 4
> [java] `/home/berkley/tmp/gdal_wms.xml' not recognised as a
> supported file format.
>
> If I try to run the same command on the command line I get:
>
> berkley at dana:~/project/ptII$ gdal_translate -ot Byte -of GTiff
> ~/tmp/gdal_wms.xml gdal_wms.tif
> ERROR 4: `/home/berkley/tmp/gdal_wms.xml' not recognised as a supported
> file format.
>
> GDALOpen failed - 4
> `/home/berkley/tmp/gdal_wms.xml' not recognised as a supported file format.
>
>
> Is it working for you when you run it on the command line? I just
> installed the newest version of gdal available for ubuntu and I get that
> error when using your input file.
>
> I was able to get the actor to stop crashing the entire workflow by
> specifying "No Caching" in the cache options for the gdal_translate actor.
>
> chad
>
>
> Niels Hoffmann wrote:
> > Hi Chad,
> >
> > Maybe I misunderstood the purpose of the GDAL Format Translator. I
> > assumed it was a wrapper around gdal_translate.exe. The way GDAL
> > Translate works is you throw any of the supported file types at it
> > (including wms) and you specify the output Type and Format (see my
> > example C:\FWTools2.1.0>gdal_translate -ot Byte -of GTiff gdal_wms.xml
> > gdal_wms.tif)
> > Is it true that the GDAL Format Translator actor only accepts GTiff as
> > input and converts that into any of the supported output formats?
> > In which case it is not usable for my purposes. Can you recommend an
> > actor to consume a WMS service to then do image analysis on? I tried
> > using the 'Convert URL To Image' actor but I can't seem to get hold of
> > the resulting image for analysis purposes.
> >
> > Cheers,
> > Niels Hoffmann
> >
> > >>> Chad Berkley <berkley at nceas.ucsb.edu> 2/04/2008 7:37 a.m. >>>
> > Hi Niels,
> >
> > I've been looking into this and I think you're sending the GDAL Format
> > Translator the wrong file type. It's expecting a GTIFF and you're
> > giving it an xml file. Take a look at
> > kepler/workflows/test/gdal-test.xml for an example. Let me know if it
> > still won't work for you.
> >
> > The error handling on the JNI connection between the GDAL C code and the
> > java interface is not very good. That's why it just crashes when
> > something goes wrong. Not optimal, I know but the interface is pretty
> > lacking when it comes to error handling.
> >
> > chad
> >
> >
> > Niels Hoffmann wrote:
> > > Hi Chad,
> > >
> > > Here's the workflow as well as the wms specification file for
> gdal. The
> > > WMS Service is behind our Firewall, so you won't be able to access it.
> > > As I explained in the original email, if I run the following on the
> > > command prompt I get a valid Tif file.
> > > C:\FWTools2.1.0>gdal_translate -ot Byte -of GTiff gdal_wms.xml
> > gdal_wms.tif
> > >
> > > I'm running Kepler 1.0.0rc1 on WinXp sp2.
> > > I basically copied part of the workflow from
> demos\ENM\GDAL_h1K_NS.xml.
> > >
> > > What I noted is that if I open the GDAL Format Translator actor in
> that
> > > workflow it has dropdowns for 3 of the parameters:
> > >
> > > If I grab the actor in a new project from the GeometricOperation
> > > components it does not have those dropdowns:
> > >
> > > Might it be that there are 2 different versions installed? I tried
> both
> > > (dragging the one from the components and copying the one out of the
> > > sample workflow) and both are crashing.
> > > I also have FWTools 2.1 installed (1.6.0dev) as well as the GDAL
> > > Binaries in my Python installation (1.5). Is the actor grabbing GDAL
> > > from the system path or is it locally to the Kepler install? (I
> noticed
> > > the 1.2 dll sitting in the Kepler\lib folder)
> > >
> > > Cheers,
> > >
> > >
> > > =============================
> > > Hi Niels,
> > >
> > > I'm looking into this. Could you email me the workflow you are using?
> > >
> > > thanks,
> > > chad
> > >
> > > niels hoffmann wrote:
> > >> Hi,
> > >>
> > >> I am trying to use a GDAL Format Translator to convert a WMS service
> > >> to a GeoTiff.
> > >> I created a xml file with my WMS connection settings as specified by
> > >> the GDAL Documentation. If I run it from the GDAL Command prompt
> > >> (FWTools) I get a proper result.
> > >> But if I use the same xml file as input for the GDAL Format
> Translator
> > >> my workflow crashes.
> > >> Attached is the dump that gets created.
> > >> Anybody knows what my problem is?
> > >>
> > >> Is there maybe another way to use a WMS service in Kepler?
> > >>
> > >> Kind regards,
> > >> Niels Hoffmann
> > >>
> > >>
> > >>
> ------------------------------------------------------------------------
> > >>
> > >> _______________________________________________
> > >> Kepler-users mailing list
> > >> Kepler-users at ecoinformatics.org
> > >>
> >
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users
> > >>
> > >>
> > >> Niels Hoffmann
> > >> GIS Specialist
> > >>
> > >> ph: +64 (0)7 859 3726
> > >> fax: +64 (0)7 859 3701
> > >> Email: hoffmannN at landcareresearch.co.nz
> > >>
> > >> Landcare Research
> > >> Gate 10
> > >> Silverdale Road
> > >> Hamilton
> >
> > Please consider the environment before printing this email
> >
> > *WARNING* : This email and any attachments may be confidential and/or
> > privileged. They are intended for the addressee only and are not to be
> > read, used, copied or disseminated by anyone receiving them in error. If
> > you are not the intended recipient, please notify the sender by return
> > email and delete this message and any attachments.
> >
> > The views expressed in this email are those of the sender and do not
> > necessarily reflect the
> > official views of Landcare Research. _ http://www.landcareresearch.co.nz_
> >
>
More information about the Kepler-dev
mailing list