Using Natural Earth Raster Data in GeoServer

Home Forums Advice & Tutorials Software & Services Using Natural Earth Raster Data in GeoServer

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3402

    wlerner
    Participant

    I am attempting to use Natural Earth raster data with GeoServer under Linux. I am unsure of how to use a .tif and .tfw file to setup a store. Any help with this would be appreciated.

    #4067

    wlerner
    Participant

    After much Googling, I discovered the answer for this question on my own. The answer was posted on a blog, located at http://bla.sphemo.us/?p=3 The answer is pasted below in case the blog disappears. This worked fine for me under Red Hat Linux 5.5, with FWTools version 2.0.6.

    ====================

    Natural Earth provides three raster data sets at 1:10m that are relatively easy to integrate into GeoServer.

    This assumes you have GeoServer 2.0.1 and GDAL installed. GDAL is available as a package for most linux distributions, as source via their website, and in the FWTools kit. If you are on Windows, FWTools is your only option. FWTools has not been updated for Linux in some time, I’d recommend compiling from source.

    Once you get GDAL installed, download the large raster version of Natural Earth that you want to serve via GeoServer. Unzip.

    If on Windows, run the commands from the FWTools shell. If not, you can figure it out.

    ]$ gdal_translate -a_srs EPSG:4326 -of GTiff -co “TILED=YES” -co “TFW=YES” PATH_TO_DOWNLOAD.tif OUTPUT_FILE.tiff

    Once that completes:

    ]$ gdaladdo -r averages OUTPUT_FILE.tiff 2 4 8 16 32 64 128

    Note: Some old versions of libtiff will generate errrors when running the above command. If you get errors, update your GDAL to use a newer version of libtiff. FWTools for windows should be safe.

    You should now have a properly referenced .tiff and .tfw file. Now we must add it to GeoServer. Open up your GeoServer admin and add a new “ WorldImage – A raster file accompanied by aspatial data file” store. Add the path to the TIFF in to the “URL *” field.

    Publish the resulting dataset, and wala. Test the layer with the Layer Preview tool. Seed it with GeoWebCache to speed up the access and you have a nice reliable basemap for all your mapping applications.

    #4068

    Nathaniel
    Keymaster

    Thanks for the update and sharing your research!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.