LizardTech.com

Archive for the ‘Usage Tips & Tricks’ Category

Adding projection information to MrSID images in ArcGIS Explorer and in GeoExpress

Thursday, April 21st, 2011

We’ve had some emails from people who are having trouble viewing MrSID images in Esri’s ArcGIS Explorer. We dug around and found out that our friends at Esri had already been notified of the same issue and they’d already discovered that the problem was undefined projections. MrSID images are sometimes created from TIFFs that have no projection information, or the projection is written to an AUX (.aux) file but not included in the actual MrSID image.  

Esri has posted an article on how to fix the problem for immediate viewing using ArcCatalog. Click here or enter this URL in a browser:

http://blogs.esri.com/info/blogs/arcgisexplorerblog/archive/2009/
03/05/projections-and-mrsid-images-for-explorer.aspx

Of course, defining the projection in ArcCatalog only writes the information to an AUX file, not into the MrSID file itself, which would be a better practice. Users should ask their data provider to include the projection system (LizardTech’s GeoExpress® software calls this the coordinate reference system or CRS) in the metadata of the MrSID files they deliver.

As for any images you have already, if you know what their projection is and have access to a licensed copy of GeoExpress, simply add any number of MrSID images of the same projection to the GeoExpress Edit Metadata tab and specify that projection for all of them at once.

GeoExpress metadata

Adding projection information to images by using the Metadata tab in GeoExpress. Click for a larger version.

To edit the metadata of existing MrSID images using GeoExpress:

  1. Load images into the Edit Metadata tab of the Job list.
  2. Select applicable image(s) and choose Metadata from the Options menu. The Metadata Manager dialog appears.
  3. Select the Image tab. Click Select Coordinate Reference System. The Coordinate Reference System Selector appears.
  4. Select a projection system using the drop-down menus and then click OK.

You can also use the GeoExpress command line tool mrsidgeometa to add a well known text (WKT) string. The syntax is as follows:

mrsidgeometa.exe -f <filename.sid> -awkt <WKT string>

Yes you can

Monday, December 20th, 2010

A few months back someone contacted us wondering if we had a way to view MrSID images downloaded to disk using Linux. Well, we (LizardTech) do not officially offer a native Linux viewer, but I got to wondering about it and tried out the following steps on an Ubuntu 10.10 desktop release. Note that while the versions provided in the steps below were specific to the Firefox and Ubuntu releases at the time I tried this, you should be able to get similar results with other recent versions of Linux (both Ubuntu and other distros).

Here are the steps if you want to try it.

  1. Install Wine 1.2 (version 1.2.1-0ubuntu1) from universe (using Synaptic or your favorite method).
  2. From native Linux Firefox download the latest version of Firefox for Windows (Firefox Setup 3.6.12.exe).
  3. Set the executable bit on the downloaded Firefox setup file.
  4. Right-click the setup file from Nautilus or your favorite file explorer, then click Open With Wine Windows Program Loader.
  5. Install Firefox in Wine.
  6. Run the Windows version of Firefox (via Wine), go to http://www.lizardtech.com/downloads/viewers.php and download the ExpressView Browser Plug-in utility for Windows.
  7. From the Wine File Manager double-click the downloaded ExpressView Browser Plug-in utility.
  8. Install ExpressView.
  9. Download your favorite MrSID file to the local file system.
  10. Navigate to the file in the address bar of the Windows version of Firefox (running in Wine). Note: drag-drop from the Wine File Manager doesn’t seem to work.

You should end up with something that looks a little like this (click to enlarge the image below):

MrSID in Linux

Note: to see the ExpressView About box, right-click on your image and choose About ExpressView.

Express Server serves up New Jersey

Monday, January 5th, 2009

The State of New Jersey’s 2007 orthoimagery is now available for download from the New Jersey Geographic Information Network’s newly-designed NJ Information Warehouse, which uses LizardTech’s Express Server to serve all compressed orthoimagery layers.

NJGIN's Information Warehouse website

The imagery is available in both MrSID format (compressed 8-bit, 3-band, RGB natural color, 5000′ by 5000′ tiles) and JPEG 2000 format (compressed 8-bit, 4-band RGB plus infrared, 5000′ by 5000′ tiles). The site looks great and is easy to use, and we’re pretty proud of the way Express Server performs on it.

You can add the WMS layer of New Jersey’s 2007 orthoimagery into any application supporting WMS by entering the following URL:

http://njwebmap.state.nj.us/njorthos

Floating licenses in GeoExpress

Tuesday, November 4th, 2008

We added floating licenses to GeoExpress a couple of versions ago to give customers more flexibility, but many customers aren’t aware of what floating licenses are or how they work. This Q & A addresses the most common questions we get about floating licenses.

What is a floating license?

A floating license is a license that moves around among the members of your organization as needed. It’s a means of enabling a user on a networked computer to lease or “check out” a GeoExpress license for the period of time they are working. When they quit GeoExpress, the license is returned to the license server and becomes available for another user.

What’s the benefit of using floating licenses? I need to tell my boss what the benefit would be.

Try this on the boss: “Using floating licenses makes for very efficient use of our organization’s software license budget.” Rather than purchase licenses for every single person in your outfit that might possibly need to use GeoExpress at some point, you can buy licenses for just the number of people who are likely to need to use the software concurrently. If that weren’t enough, floating licenses also take a load off your IT administrator, who no longer has to go to each computer to run GeoExpress and write down a locking code. With floating licenses the licenses for all your organization’s copies of GeoExpress can be managed centrally.

Which editions of GeoExpress can we use a floating license with?

Floating licenses can be used with GeoExpress Tools, GeoExpress Standard and GeoExpress Unlimited editions.

GeoExpress Remote Edition is one of those, right?

No. GeoExpress Remote Edition is its own edition and floating licenses don’t work with it. If you’ve got GeoExpress Remote Edition you‘ll need a remote license. Contact your LizardTech representative to get one.

So, how does a floating license work? How do I check one out?

When you run GeoExpress, the software “looks for” a license on the network and if one is available, you’re off to the races. You don’t have to DO anything. It all happens automatically and invisibly. In fact, users at an unfamiliar workstation running GeoExpress with a floating license checked out on the network would not necessarily know they weren’t using a local license. Users generally won’t even have to think about how their software is licensed.

You said “if one is available”. Why would a license NOT be available, and what happens then?

The license server only distributes as many licenses as your organization has purchased. After all your licenses have been assigned, the license server waits for a license to be checked back in before it allows any more to be checked out. If this happens, the next user that runs GeoExpress gets a message alerting them that all the licenses are in use, and they’ll have to wait for the next available license.

What’s a license server? It sounds expensive.

Generally speaking, any computer on your network can be a license server. You just have to install the license server software on it. The license server software costs you nothing. It’s provided for you on the GeoExpress installation disk.

As a user just trying to run GeoExpress, do I have to know which computer on the network is a license server?

No. GeoExpress automatically searches out the nearest license server on your network. However, if you wish you can tell the software where on the network you would prefer it to look by specifying a license server.

Can I also specify that I’d prefer a NITF-enabled license if one is available?

Did we pay you to ask that? Why, yes. Yes, you can.

Where do I do all this specifying about licenses and license servers?

Choose Floating Licenses from the Options menu on GeoExpress’ menu bar. A dialog box appears where you can specify a license server and whether you’d prefer a NITF license.  

With floating licenses, does GeoExpress still get installed on a local computer?

Yes. GeoExpress is still installed on individual workstations, but the workstations do not have individual licenses. The license server stores all the licenses and keeps track of them.

 

Calling the SDK from C#

Tuesday, October 14th, 2008

Because we support multiple platforms (Windows, Solaris, Linux, Mac), our Decode SDK is written in C++.  Some years ago, our C++ APIs used to regularly lead to the question, “do you support Java?”.  The answer was always sorry, no, we’re not a Java shop and we don’t have any Java bindings… But we’ve always provided a relatively simple C API which we claimed could be wrapped using JNI, and for the most part that made people happy.

For the past year or so, though, all the Java requests seem to have disappeared, only to be replaced by the question, “do you support .NET?”  This usually means “do you have any C# bindings?”, although we do get the occasional VB.NET request.  Our response has been sorry, no, we’re not a C# shop and we don’t have any .NET bindings… But, again, we’ve told people that “it ought to be fairly easy to call out to our C API using P/Invoke, .NET’s Interop functionality”.

Well, recently some of the engineers here at LizardTech HQ have started programming in C# for reals, and so now we actually have just enough in-house expertise on the question to be able to provide some additional help on this one.  While the current DSDK release doesn’t provide any C# bindings, we have put together a very simple example app that shows how to use Interop to access the C API.

The code is, at heart, remarkably simple.  First, you declare your C functions so they can be accessed from within your C# class, like so:

      [DllImport("lti_dsdk_cdll.dll")] 
      static extern int ltic_openMrSIDImageFile(out 
            IntPtr image, string fileName); 

      [DllImport("lti_dsdk_cdll.dll")] 
      static extern uint ltic_getWidth(IntPtr image);

Then, you close your eyes, tap your ruby slippers together three times, and innocently call the functions just like they were real functions:

      // this is essentially our void* pointer 
      IntPtr image = IntPtr.Zero; 
      string infile = "..."; 

      sts = ltic_openMrSIDImageFile(out image, infile); 
      ... 
      uint width = ltic_getWidth(image); 
      ...

You can download the full example from here.

Yes, we know, it’d be nice to provide interop support for the C++ classes so as to give access to the whole SDK… but quite frankly, we’re not sure the market demand is really there yet.  At the very least, though, we’ll try to include interop support for the C API in the next release of the SDK.

Keep those cards and letters coming.

-mpg