[Talk-us] Tile layer in JOSM

Martijn van Exel m at rtijn.org
Mon Nov 28 18:10:28 GMT 2011


I am not a tiled map service wizard but I sure thought I could get this done.
What I have: a Shapefile with roads in Utah[1].
What I want: to get a background layer for JOSM / Potlatch that
highlights the named highways (federal, state and local numbered
routes).
Why I want this: to (allow people to) fix highway ref relations, a lot
of them are broken around here it looks like, and I broke one more
yesterday.

What I did:
* Styled the Shapefile layer to achieve the visualization I required
using the pretty awesome AtlasStyler[2] which lets you just copypaste
SLD right into GeoServer. Works like a charm.
* Publish the shapefile as a WMS through GeoServer[3].
* Tried to publish a TMS layer using geoserver. Failed. TMS in
Geoserver broken or something? I get this [4] error when trying to do
anything TMS.
* Installed MapProxy[5] and added the GeoServer WMS as a layer definition:

layers:
  - name: utahroads
    title: Utah road network
    sources: [utah_cache]
caches:
  utah_cache:
   grids: [GLOBAL_MERCATOR, global_geodetic_sqrt2]
   sources: [utah_wms]
sources:
  utah_wms:
    type: wms
    req:
      url: http://localhost:8080/geoserver/schaaltreinen/wms?
      layers: schaaltreinen:utahroads

* Ran MapProxy, tried the demo layer for both 900913 and 4326, looked
fine. A few upstream errors from GeoServer, fixed those by increasing
the heap space setting for Tomcat. (rediculously low by default).
* got the URL for one 900913 tile, copied that and imported into the
WMS/TMS layer prefs in JOSM, substituting actual values for
{zoom},{x},{y} respectively:

http://192.168.1.6:8000/tms/1.0.0/utahroads_EPSG900913/8/261/313.png
--> http://192.168.1.6:8000/tms/1.0.0/utahroads_EPSG900913/{zoom}/{x}/{y}.png

The result is only white tiles, so I'm guessing I entered the
disneyland of map projection screw ups. Or is it a bounding box / tile
origin issue? I defined a global bounding box for the tile layer.

Martijn

[1] http://gis.utah.gov/sgid-vector-download/utah-sgid-vector-gis-data-layer-download-index?fc=Roads
[2] http://en.geopublishing.org/AtlasStyler
[3] http://geoserver.org/display/GEOS/Welcome
[4] http://osgeo-org.1803224.n2.nabble.com/Does-TMS-work-at-all-in-Geoserver-2-1-2-td6940862.html
[5] http://mapproxy.org/
-- 
martijn van exel
geospatial omnivore
1109 1st ave #2
salt lake city, ut 84103
801-550-5815
http://oegeo.wordpress.com



More information about the Talk-us mailing list