command line cropping problem

For discussion of LizardTech's geospatial encoding and manipulation software and general discussion of MrSID and JPEG 2000.

Moderator: jskiffington

command line cropping problem

Postby grouse » Wed Jan 13, 2010 12:38 pm

I'm trying to use the command line mrsidgeoencoder.exe to crop an image.

Here is what i'm typing at the command prompt:
mrsidgeoencoder -i D:\2009_Ortho_Cut\NAD27\Humboldt_County_NAD27.sid -cropulxy 404870.624791 4523622.130743 -croplrxy 415974.566365 4512708.188170 -o D:\2009_Ortho_Cut\NAD27\H05N01E.sid -wf

I get the following error message: Cropping values in image (pixel) space must be integers.

I find this odd because the information listed under cropping switches in the Command line help show for example "-cropulxy float0 float1 Upper left XY position of a cropping rectangle".
grouse
 
Posts: 4
Joined: Wed Jan 13, 2010 12:32 pm

Postby rparker » Wed Jan 13, 2010 12:54 pm

Try adding -coord to your command to crop in coordinate space.
rparker
 
Posts: 237
Joined: Tue Jan 15, 2008 3:20 pm
Location: LizardTech

new error after adding -coord switch

Postby grouse » Wed Jan 13, 2010 1:36 pm

I added the switch -coord, and now get the error:

mrsidgeoencoder.exe usage error: extra arguments found (404870.624791 ...)

where 404870.624791 would be the floating point x coordinate that I presume would be needed for the switch,

-cropulxy float0 float1
grouse
 
Posts: 4
Joined: Wed Jan 13, 2010 12:32 pm

Postby rparker » Wed Jan 13, 2010 1:47 pm

Try this:

mrsidgeoencoder -i "D:\2009_Ortho_Cut\NAD27\Humboldt_County_NAD27.sid" -o "D:\2009_Ortho_Cut\NAD27\H05N01E.sid" -cropulxy 404870.624791 4523622.130743 -croplrxy 415974.566365 4512708.188170 -coord -wf
rparker
 
Posts: 237
Joined: Tue Jan 15, 2008 3:20 pm
Location: LizardTech

Postby grouse » Wed Jan 13, 2010 1:58 pm

Got it to work by adding "geo" after -coord

mrsidgeoencoder -i D:\2009_Ortho_Cut\NAD27\Humboldt_County_NAD27.sid -coord [b]geo[/b] -cropulxy 404870.624791 4523622.130743 -croplrxy 415974.566365 4512708.188170 -o D:\2009_Ortho_Cut\NAD27\H05N01E.sid -wf

The only other thing I need is to have it create the world file. It seems the switch -wf is being ignored.

In the echo of information that follows I notice the info:

"Ignoring flag: -wf doesn't apply to MrSID optimizing.

When I crop through the GeoExpress GUI a world file is automatically created.
grouse
 
Posts: 4
Joined: Wed Jan 13, 2010 12:32 pm

Postby grouse » Wed Jan 13, 2010 2:04 pm

Robert,

I download the command line world file creator, and will use that after I've fininshed cropping, unless there is an easier method.

Thanks for your help, hopefully my problems are solved.

Glen
grouse
 
Posts: 4
Joined: Wed Jan 13, 2010 12:32 pm

Postby rparker » Wed Jan 13, 2010 2:09 pm

Oops! I left out "geo". Sorry about that.

The command line is pretty smart in that it "optimizes" when it sees an operation that only requires editing a MrSID G3 file. There is also no way to tell it not to do that at this time.

I'm not sure why it won't output a world file, but

mrsidgeoinfo -wf imagename.sid

will produce one.

I'll log this in our bug tracker.
rparker
 
Posts: 237
Joined: Tue Jan 15, 2008 3:20 pm
Location: LizardTech


Return to GeoExpress

Who is online

Users browsing this forum: No registered users and 1 guest

cron