OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>

Join the forum, it's quick and easy

OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>
OruxMaps
Would you like to react to this message? Create an account in a few clicks or log in to continue.

command-line version of the OruxMapDesktop

5 posters

Go down

command-line version of the OruxMapDesktop Empty command-line version of the OruxMapDesktop

Post  Randolph Tue Dec 21, 2010 8:11 am

Hi,

Can you provide the command-line version of the OruxMapDesktop? I use some tools to create contour maps, often need to change the map content, such as adding waypoint, track, etc., to re-generate the map using the OruxMapDesktop need to manually enter the calibration data are subject to the command line version Only need to write a script on it.
Or provide documentation OruxMap multi-map format, I was allowed to develop this program.

Regards,
randolph

Randolph

Cantidad de envíos : 5
Fecha de inscripción : 2010-12-21

Back to top Go down

command-line version of the OruxMapDesktop Empty Re: command-line version of the OruxMapDesktop

Post  orux Wed Dec 22, 2010 5:54 pm

Randolph wrote:Hi,

Can you provide the command-line version of the OruxMapDesktop? I use some tools to create contour maps, often need to change the map content, such as adding waypoint, track, etc., to re-generate the map using the OruxMapDesktop need to manually enter the calibration data are subject to the command line version Only need to write a script on it.
Or provide documentation OruxMap multi-map format, I was allowed to develop this program.

Regards,
randolph

Hi, Randolph;

I will work with command line version next weeks,

orux
orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

command-line version of the OruxMapDesktop Empty Re: command-line version of the OruxMapDesktop

Post  Randolph Wed Apr 27, 2011 7:09 am

Hi,

Latest version does not support the command-line features, at what time before support?

randolph

Randolph

Cantidad de envíos : 5
Fecha de inscripción : 2010-12-21

Back to top Go down

command-line version of the OruxMapDesktop Empty Re: command-line version of the OruxMapDesktop

Post  orux Fri Apr 29, 2011 5:39 pm

Randolph wrote:Hi,

Latest version does not support the command-line features, at what time before support?

randolph

ufff

I promise a first version in a week!

orux
orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

command-line version of the OruxMapDesktop Empty news

Post  xalien Thu Jun 23, 2011 1:45 pm

hi orux, any news about OruxMapsDesktop command line support?
thanks

xalien

Cantidad de envíos : 5
Fecha de inscripción : 2011-06-01

Back to top Go down

command-line version of the OruxMapDesktop Empty Re: command-line version of the OruxMapDesktop

Post  orux Thu Jun 23, 2011 5:35 pm

xalien wrote:hi orux, any news about OruxMapsDesktop command line support?
thanks

Hi,

last version supports command line commands; but I have to write a manual.

execute the .jar with -h param:
java -jar OruxMapsDesktop.jar -h

orux

orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

command-line version of the OruxMapDesktop Empty Re: command-line version of the OruxMapDesktop

Post  Randolph Thu Dec 15, 2011 7:22 am

I am using Windows XP, parameter format is a little different, datum name is also different from OruxmapsDesktop interface, I spent some time to resolve, the following examples:

java -Xmx512m -jar OruxMapsDesktop.jar -i=C:\Export\GuangzhouNorth12.jpg -p=LATITUDE/LONGITUDE -n=GuangzhouNorth "-d=WGS 1984Global Definition" -r=geo,0,0,113.198184,23.405169,N;geo,1113,1023,113.549287,23.082457,N -q=JPEG,85 -o=C:\Oruxmaps

Randolph

Cantidad de envíos : 5
Fecha de inscripción : 2010-12-21

Back to top Go down

command-line version of the OruxMapDesktop Empty Re: command-line version of the OruxMapDesktop

Post  orux Thu Dec 15, 2011 7:56 pm

Randolph wrote:I am using Windows XP, parameter format is a little different, datum name is also different from OruxmapsDesktop interface, I spent some time to resolve, the following examples:

java -Xmx512m -jar OruxMapsDesktop.jar -i=C:\Export\GuangzhouNorth12.jpg -p=LATITUDE/LONGITUDE -n=GuangzhouNorth "-d=WGS 1984Global Definition" -r=geo,0,0,113.198184,23.405169,N;geo,1113,1023,113.549287,23.082457,N -q=JPEG,85 -o=C:\Oruxmaps

Hi, Randolph;

I thought no one was interested, so I have not finished the manual!

I will try to finish it.

Please, ask if you need help
orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

command-line version of the OruxMapDesktop Empty Re: command-line version of the OruxMapDesktop

Post  csparksfly Thu Jun 28, 2012 7:40 am

Hi,

I am running ubuntu and get his error:

Command:
java -jar -Xmx512m OruxMapsDesktop.jar -i='map.tif' -p="LAMBERT CONFORMAL,-29.0,22.0,-26.6666.0,-33.3333,0.0,0.0" -c='map.tfw' -d='WGS 1984' -n='piet' -o='generated' -q=JPEG,85
Output:
3-->

...then I found that I had this issue:
"If you have got your images in tif format, you must have installed in your jvm the jai I/O tools" found here

Then rather using the jpg version it works!
Command:
java -Xmx512m -jar OruxMapsDesktop.jar -i=map.jpg -n=nelspruit-1-0_5M -d="WGS 1984Global Definition" -p='LAMBERT CONFORMAL,-25,30,-26.6666,-33.3333,0,0' -c=map.tfw -o=generated

If you get the error:
1007-->Error: Calibrating the map!
you will have to make sure you have the right projection values. If you make them up, chances are you will get this error.

this post has been edited a couple of times. Seems I figured out my own questions...

Thanks,
Craig.

csparksfly

Cantidad de envíos : 1
Fecha de inscripción : 2012-06-28

Back to top Go down

command-line version of the OruxMapDesktop Empty Correct command line under WinXP?

Post  mbraner Mon Oct 15, 2012 2:35 am

I'm trying to use OruxmapsDesktop via the command line, on Windows XP. I am getting error messages, and wonder if the problem is related to the quotes. The examples up the thread use a mix of single and double quotes and I don't understand why. Also, since I am using the Windows XP command line environment, i.e. basically MS-DOS, the quotes may be stripped off by MS-DOS. I tried the following command line, hoping that the outer double quotes would be eaten by MS-DOS, leaving the inner single quotes for the java app:

java -Xmx512m -jar OruxMapsDesktop.jar "-i='map.png' -c='map.tfw' -d='North American 1927MEAN FOR CONUS' -p='UTM,18' -n='map' -q=PNG -sqlite"

But I get the error message: "1008-->Error: Reading calibration points!"

Also tried this version of the command line, with the double quotes "protecting" individual command line options:

java -Xmx512m -jar OruxMapsDesktop.jar -i=map.png -c=map.tfw "-d='North American 1927MEAN FOR CONUS'" "-p='UTM,18'" -n=map -q=PNG -sqlite

and got this error message:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at oruxmapsdesktop.OruxMapsDesktopApp.commandline(OruxMapsDesktopApp.java:128)
at oruxmapsdesktop.OruxMapsDesktopApp.main(OruxMapsDesktopApp.java:336)

-------- edit ---------

Well finally found a version that works:

java -Xmx512m -jar OruxMapsDesktop.jar -i=C:\Programs\OruxMapsDesktop\map.png -c=map.tfw "-d=North American 1927MEAN FOR CONUS" -p=UTM,18 -n=map -q=PNG,90 -sqlite

- here I've removed ALL the single quotes, and used double-quotes to protect the one parameter that has an embedded space (the datum name). Moreover, I added an absolute path to the image file. Apparently the calibration file (and output folder) inherited that path. What's confusing is that I am invoking this command line (in a .bat file) from a shortcut that sets that path location as the "current working folder". But perhaps once "java" is started it no longer remembers that working folder of the command line that started it? Ah, the joys of working in an MS-DOS command-line environment... The good news is that I can therefore keep the actual maps out of the OruxMapsDesktop program folder, since I have to explicitly provide the path to the map image anyway.

Also, had to add the ",90" extra parameter for the PNG output format to avoid the "ArrayIndexOutOfBoundsException" error. I don't know why PNG needs a quality parameter, since it's a lossless format? I am using PNG rather than JPG because I am converting old style topo maps that have mostly lines and solid colors, and the PNG format results in a map that is 2-3 times smaller than JPG in this case.


Last edited by mbraner on Mon Oct 15, 2012 3:21 am; edited 2 times in total (Reason for editing : found a version that works)

mbraner

Cantidad de envíos : 7
Fecha de inscripción : 2012-10-12

Back to top Go down

command-line version of the OruxMapDesktop Empty Re: command-line version of the OruxMapDesktop

Post  orux Mon Oct 15, 2012 5:18 pm

mbraner wrote:I'm trying to use OruxmapsDesktop via the command line, on Windows XP. I am getting error messages, and wonder if the problem is related to the quotes. The examples up the thread use a mix of single and double quotes and I don't understand why. Also, since I am using the Windows XP command line environment, i.e. basically MS-DOS, the quotes may be stripped off by MS-DOS. I tried the following command line, hoping that the outer double quotes would be eaten by MS-DOS, leaving the inner single quotes for the java app:

java -Xmx512m -jar OruxMapsDesktop.jar "-i='map.png' -c='map.tfw' -d='North American 1927MEAN FOR CONUS' -p='UTM,18' -n='map' -q=PNG -sqlite"

But I get the error message: "1008-->Error: Reading calibration points!"

Also tried this version of the command line, with the double quotes "protecting" individual command line options:

java -Xmx512m -jar OruxMapsDesktop.jar -i=map.png -c=map.tfw "-d='North American 1927MEAN FOR CONUS'" "-p='UTM,18'" -n=map -q=PNG -sqlite

and got this error message:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at oruxmapsdesktop.OruxMapsDesktopApp.commandline(OruxMapsDesktopApp.java:128)
at oruxmapsdesktop.OruxMapsDesktopApp.main(OruxMapsDesktopApp.java:336)

-------- edit ---------

Well finally found a version that works:

java -Xmx512m -jar OruxMapsDesktop.jar -i=C:\Programs\OruxMapsDesktop\map.png -c=map.tfw "-d=North American 1927MEAN FOR CONUS" -p=UTM,18 -n=map -q=PNG,90 -sqlite

- here I've removed ALL the single quotes, and used double-quotes to protect the one parameter that has an embedded space (the datum name). Moreover, I added an absolute path to the image file. Apparently the calibration file (and output folder) inherited that path. What's confusing is that I am invoking this command line (in a .bat file) from a shortcut that sets that path location as the "current working folder". But perhaps once "java" is started it no longer remembers that working folder of the command line that started it? Ah, the joys of working in an MS-DOS command-line environment... The good news is that I can therefore keep the actual maps out of the OruxMapsDesktop program folder, since I have to explicitly provide the path to the map image anyway.

Also, had to add the ",90" extra parameter for the PNG output format to avoid the "ArrayIndexOutOfBoundsException" error. I don't know why PNG needs a quality parameter, since it's a lossless format? I am using PNG rather than JPG because I am converting old style topo maps that have mostly lines and solid colors, and the PNG format results in a map that is 2-3 times smaller than JPG in this case.

Thanks for your feedback.

It should work with single quotes with the strings with spaces:

java -Xmx512m -jar OruxMapsDesktop.jar -i=C:\Programs\OruxMapsDesktop\map.png -c=map.tfw -d='North American 1927MEAN FOR CONUS' -p=UTM,18 -n=map -q=PNG,90 -sqlite

About PNG; it is not well expressed. The numerical value refers to the compression, not the quality. You have to have installed jai-iotools so you can use a different value to the default value.

orux
orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

command-line version of the OruxMapDesktop Empty PNG, JAI

Post  mbraner Tue Oct 16, 2012 1:07 am

Thanks, Orux. What number should I put after "PNG" for best compression? Regarding JAI, I have installed it, but still OruxMapsDesktop (or Java itself?) does not seem to recognize it, therefore I have to convert the input image from TIF to PNG first. I downloaded and ran the EXE version with "JRE" in the file name, ran it, and verified that the JAI files have been installed into the Java folder. Still does not work. Why is JAI not recognized? Thanks for any help.

mbraner

Cantidad de envíos : 7
Fecha de inscripción : 2012-10-12

Back to top Go down

command-line version of the OruxMapDesktop Empty Re: command-line version of the OruxMapDesktop

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum