Skip to content

Testing Quickly With The Binary Independent Package

Andrea Aime edited this page Apr 23, 2020 · 2 revisions

In order to help you quickly assess the data directory, we have prepared a sample zip package with a "GeoServer platform independent binary" configured with the low resolution data, as a GeoPackage, and the New York state high resolution OSM data, also as a GeoPackage.

In order to use it:

  • Make sure you have either Java 8 or Java 11 installed. Java 8 is the recommended version, Java 11 is tested too. Other versions (9,10,12,13,14,...) are not officially supported.
  • Download and unpack the GeoServer platform independent binary
  • Get into the fonts directory, it contains sub-folders for each font. Install them so that they are visible to all users.
    • On Windows, right click the TTF files (one can select a group first), and "install for all users" (requires administration access).
    • On Linux, look for the method supported by your distribution. Here is an example for Ubuntu.
    • On OSX, use the Font Book application.
  • Start the binary:
    • On Linux and OSX, cd into the root of the platform independent binary and run bin/startup.sh
    • On Windows, open the file explorer, get into the bin directory and double click on startup.bat

Then connect to GeoServer on port 8080:

http://localhost:8080/geoserver

Click on Layer Preview to preview layers.

Layer Preview

The OSM layers groups are towards the end of the first page and have a green icon. The second page also provides some osm styles layer groups.

OSM Layers on 1st Page

OSM Layers on 2nd Page

An example request is as follows:

http://localhost:8080/geoserver/osm/wms?service=WMS&version=1.1.0&request=GetMap&layers=osm%3Aosm&bbox=-2.0037508342789244E7%2C-2.00489661040146E7%2C2.0037508342789244E7%2C2.0048966104014594E7&width=767&height=768&srs=EPSG%3A3857&format=application/openlayers

You should see the following:

osm-osm

Warning: For the other layers in the default preview you'll get get a blank map when previewing them, due to scale dependencies, as they contain too much data to be displayed at world scale, or at low zoom levels in general. You'll have to zoom to the New York area to make them show up. Here is how.

The preview uses the layer bounds, which normally would cover the entire globe. generates. It can be tweaked so that you limit it to the NY area, and adding some background layers for visual reference.

You can use this request as a template, which already contains a proper bbox for New York (i.e. -8340499.1954,4872419.8459,-8004176.2709,5072684.8600 in EPSG 3857) and background layers (i.e. simplified_land_polygons and osm:land_polygons):

http://localhost:8080/geoserver/osm/wms?service=WMS&version=1.1.0&request=GetMap&layers=simplified_land_polygons,osm:land_polygons,osm:builtup_area&bbox=-8340499.1954,4872419.8459,-8004176.2709,5072684.8600&width=768&height=353&srs=EPSG%3A3857&format=application/openlayers

In this case, you will see builtup areas, because we added osm:builtup_area in the layer parameter values after the background layers.

If you want to see another layer replace osm:builtup_area with the new layer name. For example to see the roads use osm:roads:

http://localhost:8080/geoserver/osm/wms?service=WMS&version=1.1.0&request=GetMap&layers=simplified_land_polygons,osm:land_polygons,osm:roads&bbox=-8340499.1954,4872419.8459,-8004176.2709,5072684.8600&width=768&height=353&srs=EPSG%3A3857&format=application/openlayers

You should see the following:

OSM Roads