3

I have many raster outputs from an Open Source radio transmission topographic path tool called SPLAT, georeferenced in KML image overlay format.

I have figured out an easy way to use tools to convert from KML Image Overlays to PGW World Files using this small Java tool (which has fallen off the internet, I rebuilt it from Subversion repo):

Is there a way to use GDAL to make this conversion more script-able?

If I were to implement a simple script to write out world files would there be any gotchas?

I realized I had originally referenced Create world file from kml a few weeks ago, don't miss that one.

1 Answer 1

2

I made a version of WorldFileTool (which I'll call 0.3.8 because the project seems dead) that supports CLI input and can be included as part of a GDAL script:

Command line argument:

 java -jar WorldFileTool.jar image-overlay-file.kml
     Will write out pgw/tgw/jgw world file to the same folder
     Without arguments, the GUI is loaded.

It writes out a pgw/tgw/jgw file in the same folder as the kml, with the same name as the image file.

I evaluated a few shell scripts that claim to do the same task but this tool was the only one that started to feel at least slightly robust. I'd like to convert from subversion repository to github to release the source.

On Ubuntu 13.10, I built it with:

sudo apt-get install junit
export CLASSPATH=.:/usr/share/java/junit4.jar
ant
5
  • The script seems to give an error: '$ java -jar WorldFileTool.jar doc.kml Exception in thread "main" java.lang.NullPointerException at java.io.File.<init>(File.java:277) at ch.hsr.ifs.worldfiletool.ui.WorldFileTool_GUI.<init>(WorldFileTool_GUI.java:98) at ch.hsr.ifs.worldfiletool.StartWorldFileTool.main(StartWorldFileTool.java:40) $ '
    – Dave X
    Mar 23, 2015 at 14:26
  • Hmm, does the original 0.3.7 work with your image overlay kml file?
    – thadk
    Mar 23, 2015 at 15:26
  • Yes, the WorldFileTool.jar from worldfiletool_0_3_7.zip works.
    – Dave X
    Mar 23, 2015 at 21:13
  • Can I just say this works brilliantly for me - glad I stumbled on your question and answer
    – Adrian
    Apr 21, 2015 at 15:09
  • Also notable, my version of WorldFileTool cannot be completely headless, even though it only gives command line output with those inputs. I think the code would need to be modified to check System.getProperty("java.awt.headless") somewhere.
    – thadk
    Sep 19, 2016 at 2:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.