Calgarypuck Forums - The Unofficial Calgary Flames Fan Community

Go Back   Calgarypuck Forums - The Unofficial Calgary Flames Fan Community > Main Forums > The Off Topic Forum > Tech Talk
Register Forum Rules FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 02-26-2013, 03:14 PM   #21
sclitheroe
#1 Goaltender
 
Join Date: Sep 2005
Exp:
Default

Edit: Bah, didn't see Imagemagick was already being used, sorry
__________________
-Scott
sclitheroe is offline   Reply With Quote
Old 02-26-2013, 08:16 PM   #22
Barnes
Franchise Player
 
Barnes's Avatar
 
Join Date: Aug 2005
Location: Violating Copyrights
Exp:
Default

If this is satellite imagery be careful. They may be geotiffs with spatial refrencing data in the header of the file. If your compression exercises strip this data, geo scientists will kill you. If you drop bit depth or resolution they will also kill you.

Do the tiffs have associated world files? .tfw?

Any lossy compression could result in compression artifacts that are very noticeable in GIS applications or large prints.

I'm not convinced that companies are going to want you to compress any raster imagery.
Barnes is offline   Reply With Quote
Old 02-26-2013, 09:27 PM   #23
Barnes
Franchise Player
 
Barnes's Avatar
 
Join Date: Aug 2005
Location: Violating Copyrights
Exp:
Default

Just noticed you also mentioned core photos. They can be up to 13,500 dpi for measuring grain density or porosity. They can be huge files.
Barnes is offline   Reply With Quote
Old 02-26-2013, 10:31 PM   #24
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

The LZW compression I wouldn't think would change any headers in the file and is lossless, but that's a good point and I'm sure they'll test the files out.

As for the command line, looks like the process of doing multiple files is left up to the shell so windows command like psyang says or bash equivalent or whatever.

You could also morgify them, then you don't end up with a copy.

http://www.imagemagick.org/Usage/basics/#mogrify
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 02-26-2013, 11:08 PM   #25
Barnes
Franchise Player
 
Barnes's Avatar
 
Join Date: Aug 2005
Location: Violating Copyrights
Exp:
Default

Quote:
Originally Posted by photon View Post
The LZW compression I wouldn't think would change any headers in the file and is lossless, but that's a good point and I'm sure they'll test the files out.

As for the command line, looks like the process of doing multiple files is left up to the shell so windows command like psyang says or bash equivalent or whatever.

You could also morgify them, then you don't end up with a copy.

http://www.imagemagick.org/Usage/basics/#mogrify
I am 99% sure saving a geotiff out of photoshop or most raster image editors does strip the georefrencing. I can check tomorrow.

Qgis desktop will allow you to do it. You could also create an ESRI world file from the geotiff, save it out of photoshop (or whatever) compressed and use the world file to turn it back into a geotiff.
Barnes is offline   Reply With Quote
The Following User Says Thank You to Barnes For This Useful Post:
Old 02-27-2013, 02:17 AM   #26
Hack&Lube
Atomic Nerd
 
Join Date: Jul 2004
Location: Calgary
Exp:
Default

Quote:
Originally Posted by Barnes View Post
I am 99% sure saving a geotiff out of photoshop or most raster image editors does strip the georefrencing. I can check tomorrow.
I would appreciate that. I don't know how the files are being used, just how they are being stored and we need to find a better way of doing it.

At the moment what looks most promising is exporting in gimp or compressing via imagemagick into a lossless LZW .TIF format.
Hack&Lube is offline   Reply With Quote
Old 02-27-2013, 09:36 AM   #27
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

Quote:
Originally Posted by Barnes View Post
I am 99% sure saving a geotiff out of photoshop or most raster image editors does strip the georefrencing. I can check tomorrow.
How annoying! ImageMagick is a set of libraries rather than a image editor, but that doesn't mean a whole heck of a lot.

One post on the ImageMagick forum suggests that while ImageMagick doesn't specifically support geotiffs, that it will just report a warning that it found unrecognized headers and then proceed to process the image and leave the headers intact.

So hopefully that will be the case.

Awesome that you posted in this thread, I had no idea there was such a thing as geotifffs.
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 02-27-2013, 11:25 AM   #28
Barnes
Franchise Player
 
Barnes's Avatar
 
Join Date: Aug 2005
Location: Violating Copyrights
Exp:
Default

Sorry, had some .dll troubles with my qgis desktop.

Photoshop does in fact strip the georeferencing from the file.
Barnes is offline   Reply With Quote
Old 02-27-2013, 11:30 AM   #29
Barnes
Franchise Player
 
Barnes's Avatar
 
Join Date: Aug 2005
Location: Violating Copyrights
Exp:
Default

Quote:
Originally Posted by photon View Post
How annoying! ImageMagick is a set of libraries rather than a image editor, but that doesn't mean a whole heck of a lot.

One post on the ImageMagick forum suggests that while ImageMagick doesn't specifically support geotiffs, that it will just report a warning that it found unrecognized headers and then proceed to process the image and leave the headers intact.

So hopefully that will be the case.

Awesome that you posted in this thread, I had no idea there was such a thing as geotifffs.
GDAL is THE library when dealing with spatial raster data.

The OGR library lives within GDAL and handles spatial vector data.

http://www.gdal.org/

This probably doesn't help in this situation but I figured you might be interested in learning about them.

Last edited by Barnes; 02-27-2013 at 11:33 AM.
Barnes is offline   Reply With Quote
Old 02-27-2013, 12:33 PM   #30
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

Thanks, I've done quite a few projects that include geospatial aspects (though usually I work with actual shapefiles and compare them to locations coming from a mobile device, nothing like this kind of thing), always good to know defacto standards for things.

It might actually help in this situation, it looks like that library includes a utility that can add compression to an uncompressed geotiff.

So if it's a case that ImageMagick strips the headers then H&L could use that library.

http://trac.osgeo.org/gdal/wiki/UserDocs/GeoTiff
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 02-27-2013, 01:09 PM   #31
psyang
Powerplay Quarterback
 
Join Date: Jan 2010
Exp:
Default

Quote:
Originally Posted by Barnes View Post
GDAL is THE library when dealing with spatial raster data.

The OGR library lives within GDAL and handles spatial vector data.

http://www.gdal.org/

This probably doesn't help in this situation but I figured you might be interested in learning about them.
Seconded. I worked a bit with the creator of GDAL, Frank Warmerdam. He knows his stuff, and his library has definitely stood the test of time.
psyang is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 11:02 AM.

Calgary Flames
2023-24




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Calgarypuck 2021