LizardTech.com

Archive for the ‘Usage Tips & Tricks’ Category

Extending Express Server Functionality with GeoServer

Monday, September 23rd, 2013

Got five minutes? That’s all it takes to add GeoServer to an existing installation of Express Server.

GeoServer is an open source server for geospatial data and imagery. It includes support for Shapefiles, GeoTIFF, PostGIS, and much more.  You can use GeoServer to distribute imagery via standard protocols, including WMS, WFS, and WCS.

In the example below, LizardTech’s GeoViewer software displays imagery from Express Server and GeoServer. The basemap layer is a MrSID image hosted by Express Server. The vector layer is a shapefile of all the roads in Washington hosted by GeoServer.

GeoServer_imagery_in_GeoViewer

To install GeoServer on the machine that hosts the Express Server, complete the following steps:

  1. Open a web browser and navigate to the GeoServer Stable Download page:
    http://geoserver.org/display/GEOS/Stable
  2. Download the GeoServer Web Archive.
  3. Navigate to the directory where you downloaded the web archive, and extract the contents of the zip file.
  4. Copy the geoserver.war file to the following directory:<Express Server Installation Directory>\ImageServer\Tomcat\webapps
  5. Restart Tomcat.
    • On Windows, open the Services utility, right-click the LizardTech Express Server Tomcat Service, and click Restart.
    • On UNIX, open a terminal and enter the following command to stop Tomcat:
      sudo /etc/init.d/lttomd stop

      Then, enter the following command to start Tomcat:

      sudo /etc/init.d/lttomd start

To open the GeoServer Web Administration Interface, navigate to the following URL:

https://localhost:8443/geoserver

The GeoServer Welcome page appears:

GeoServer_ Welcome

Note that the URL uses https. Because Express Server’s configuration of Tomcat uses https for the Express Server Manager, GeoServer also uses https. To access imagery via WMS with GeoServer, use the following URL in your GIS software:

https://localhost:8443/geoserver/wms?

Note that GeoViewer currently only supports http connections.

To allow connections to GeoServer over http, complete the following steps:

  1. Open the following Tomcat configuration file:
    <Express Server Installation Directory>\ImageServer\Tomcat\conf\server.xml
  2. Search for the following line:
    <!--<Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />-->
  3. Remove the opening and closing comment brackets (<!-- and -->.)
  4. Save the file and restart Tomcat.

Now, when you access GeoServer imagery via WMS, you can use the following URL:

http://localhost:8080/geoserver/wms?

For more information on how to use and configure GeoServer,  refer to the GeoServer documentation.

Viewing Express Server Imagery with Leaflet

Tuesday, September 10th, 2013

Did you know that you can view Express Server imagery with Leaflet via WMS? Leaflet is an open-source JavaScript library for creating rich, interactive web maps.

In the example below, we’ve used Leaflet to display a raster layer of Washington state, a raster basemap layer, and a marker icon that identifies the location of the LizardTech office. The raster layers are stored in the MrSID format on the LizardTech demo Express Server and displayed via WMS. Note that out of the box, Leaflet includes keyboard controls, smooth zoom, support for mobile interactions, and many other features. Additionally, because Leaflet is styled with CSS3, it’s easy to customize pop-ups, controls, and even transitions.

To create the above map, complete the following steps:

  1. Download Leaflet and extract the files.
  2. Create an html file in the same directory where you extracted the Leaflet files.
  3. Link to the Leaflet stylesheet and JavaScript file in the document head.
  4. Paste the following code in the document body:
<div id="div_map" style="width: 800px; height: 600px;">
</div>
	
<script>
						
var washington = new L.tileLayer.wms(
'http://demo.lizardtech.com/lizardtech/iserv/ows', {
    layers: 'Washington',
    maxZoom: 18,
    format: 'image/png',
    transparent: true
});		
		
var modis = new L.tileLayer.wms(
'http://demo.lizardtech.com/lizardtech/iserv/ows', {
    layers: 'MODIS',
    maxZoom: 18,
    format: 'image/png',
    transparent: true
});
		
var map = new L.map('div_map', {
    center: new L.LatLng(47.60489, -122.33695), 
    zoom: 12,
    layers: [modis,washington],
    zoomControl: true
});
		
var marker_LT_office = new L.marker(
[47.60489, -122.33695]).addTo(map);
marker_LT_office.bindPopup("The LizardTech office!");
		
</script>

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