246 | | For GADM: |
| 246 | ==== Configure !GeoServer ==== |
| 247 | * Add [http://geo.eden.sahanafoundation.org/geoserver/web/?wicket:bookmarkablePage=:org.geoserver.web.data.layer.LayerPage Layer] |
| 248 | * Add [http://geo.eden.sahanafoundation.org/geoserver/web/?wicket:bookmarkablePage=:org.geoserver.wms.web.data.StylePage Style] for WMS presentation: |
| 249 | * http://docs.geoserver.org/stable/en/user/styling/sld-introduction.html |
| 250 | * Publish |
| 251 | * Apply Style |
| 252 | |
| 253 | Colours: |
| 254 | * http://www.colorsontheweb.com/colorwizard.asp |
| 255 | * http://colorschemedesigner.com/ |
| 256 | |
| 257 | Zoom Levels (in Spherical Mercator): |
| 258 | ||= Zoom Level(s) =||= !MinScale =||= !MaxScale =|| |
| 259 | || 1 || 250000000 || n/a || |
| 260 | || 2 || 100000000 || 250000000 || |
| 261 | || 3 || 50000000 || 100000000 || |
| 262 | || 4 || 25000000 || 50000000 || |
| 263 | || 5 || 10000000 || 25000000 || |
| 264 | || 6 || 5000000 || 10000000 || |
| 265 | || 7 || 2500000 || 5000000 || |
| 266 | || 8 || 2000000 || 2500000 || |
| 267 | || 9 || 1000000 || 2000000 || |
| 268 | || 10 || 500000 || 1000000 || |
| 269 | || 11 || 250000 || 500000 || |
| 270 | || 12 || 100000 || 250000 || |
| 271 | || 13 || 50000 || 100000 || |
| 272 | || 14-22 || n/a || 50000 || |
| 273 | |
| 274 | ==== Configure !GeoWebCache ==== |
| 275 | The raw WMS server will be slow, so once you've chosen your style, then you should serve via GWC. This caches pre-rendered tiles & also does MetaTiling so that the WMS has less separate requests (at a cost of increased RAM requirements) |
| 276 | |
| 277 | The version embedded within !GeoServer is great for providing a zeroconfig of the common options, however there are cases where you need to define a layer manually: |
| 278 | * Want a Background Colour (bgcolor) |
| 279 | * Want to specify an alternate style (& you'd rather not republish the layer on the WMS) |
| 280 | * Want to render a set of layers into a single tileset (so that clients don't need to download them separately & merge locally) |
| 281 | Example [http://eden.sahanafoundation.org/attachment/wiki/UserGuidelinesGISData/geowebcache.xml geowebcache.xml] for GADM attached. |
| 282 | {{{ |
| 283 | cp geowebcache.xml /var/gis/geoserver_data/gwc |
| 284 | /etc/init.d/tomcat6 restart |
| 285 | }}} |
| 286 | ==== WFS ==== |
| 287 | If you are displaying a complex dataset at zoomed-out resolutions, then you will want to have simplified views. |
| 288 | |
| 289 | e.g. Hospitals aren't shown at all at low zooms, are shown as Points at medium zooms & shown as Polygons at high zooms. |
| 290 | |
| 291 | Scale-dependent styling using SLD in !GeoServer: |
| 292 | * http://ian01.geog.psu.edu/geoserver_docs/data/naturalearth/naturalearth_physical.html |
| 293 | |
| 294 | Scale-dependent styling in !OpenLayers: |
| 295 | * http://docs.openlayers.org/library/feature_styling.html#custom-rules |
| 296 | |
| 297 | Simplifying Polygons in PostGIS: |
| 298 | * http://linfiniti.com/2011/06/scale-dependent-generalization-in-postgis-and-qgis/ |
| 299 | |
| 300 | Showing the different layers at different zooms using !GeoServer: |
| 301 | * http://docs.geoserver.org/stable/en/user/tutorials/feature-pregeneralized/feature-pregeneralized_tutorial.html |
| 302 | {{{ |
| 303 | cd |
| 304 | wget http://kent.dl.sourceforge.net/project/geoserver/GeoServer%20Extensions/2.1.0/geoserver-2.1.0-feature-pregeneralized-plugin.zip |
| 305 | cd /var/lib/tomcat6/webapps/geoserver/WEB-INF/lib/ |
| 306 | unzip ~/geoserver-2.1.0-feature-pregeneralized-plugin.zip |
| 307 | /etc/init.d/tomcat6 restart |
| 308 | }}} |
| 309 | ==== Add WMS Layer to Sahana Eden ==== |
| 310 | * ''tbc'' |
| 311 | |
| 312 | === WMS Reprojection === |
| 313 | * Have a remote WMS source that you want to access? |
| 314 | * Have a desire to keep !OpenStreetMap/Google/Bing layers? |
| 315 | * WMS source server doesn't support the 900913 projection? |
| 316 | |
| 317 | e.g. TRMM Rainfall Monitoring |
| 318 | |
| 319 | Solution: [wiki:InstallationGuidelinesGISDataLinux#ConfigurationforTRMM MapProxy] |
| 320 | === Grid === |
| 321 | We have a 'Coordinate Grid' Layer available by default. |
| 322 | |
| 323 | Other options: |
| 324 | * [wiki:BluePrintGISGrid] |
| 325 | |
| 326 | === Administrative Areas === |
| 327 | ==== GADM ==== |
| 328 | GADM is the best source of global Administrative Boundaries: |
| 329 | * http://gadm.org |
| 330 | |
| 331 | There are often better local sources for specific countries, although getting hold of these can be difficult. |
| 332 | Note that some countries have boundaries which change frequently and so datasets can often be a little out of date. |
| 333 | |
| 334 | Import into PostGIS: |
298 | | ==== Configure !GeoServer ==== |
299 | | * Add [http://geo.eden.sahanafoundation.org/geoserver/web/?wicket:bookmarkablePage=:org.geoserver.web.data.layer.LayerPage Layer] |
300 | | * Add [http://geo.eden.sahanafoundation.org/geoserver/web/?wicket:bookmarkablePage=:org.geoserver.wms.web.data.StylePage Style] for WMS presentation: |
301 | | * http://docs.geoserver.org/stable/en/user/styling/sld-introduction.html |
302 | | * Publish |
303 | | * Apply Style |
304 | | |
305 | | Colours: |
306 | | * http://www.colorsontheweb.com/colorwizard.asp |
307 | | * http://colorschemedesigner.com/ |
308 | | |
309 | | Zoom Levels (in Spherical Mercator): |
310 | | ||= Zoom Level(s) =||= !MinScale =||= !MaxScale =|| |
311 | | || 1 || 250000000 || n/a || |
312 | | || 2 || 100000000 || 250000000 || |
313 | | || 3 || 50000000 || 100000000 || |
314 | | || 4 || 25000000 || 50000000 || |
315 | | || 5 || 10000000 || 25000000 || |
316 | | || 6 || 5000000 || 10000000 || |
317 | | || 7 || 2500000 || 5000000 || |
318 | | || 8 || 2000000 || 2500000 || |
319 | | || 9 || 1000000 || 2000000 || |
320 | | || 10 || 500000 || 1000000 || |
321 | | || 11 || 250000 || 500000 || |
322 | | || 12 || 100000 || 250000 || |
323 | | || 13 || 50000 || 100000 || |
324 | | || 14-22 || n/a || 50000 || |
325 | | |
326 | | ==== Configure !GeoWebCache ==== |
327 | | The raw WMS server will be slow, so once you've chosen your style, then you should serve via GWC. This caches pre-rendered tiles & also does MetaTiling so that the WMS has less separate requests (at a cost of increased RAM requirements) |
328 | | |
329 | | The version embedded within !GeoServer is great for providing a zeroconfig of the common options, however there are cases where you need to define a layer manually: |
330 | | * Want a Background Colour (bgcolor) |
331 | | * Want to specify an alternate style (& you'd rather not republish the layer on the WMS) |
332 | | * Want to render a set of layers into a single tileset (so that clients don't need to download them separately & merge locally) |
| 386 | @ToDo: Get this imported into Sahana's gis_location table for consistency across basemap & queries (naming & boundaries). |
| 387 | |
| 388 | This can then be served as WMS using !GeoServer & !GeoWebCache |
| 389 | |
338 | | ==== WFS ==== |
339 | | If you are displaying a complex dataset at zoomed-out resolutions, then you will want to have simplified views. |
340 | | |
341 | | e.g. Hospitals aren't shown at all at low zooms, are shown as Points at medium zooms & shown as Polygons at high zooms. |
342 | | |
343 | | Scale-dependent styling using SLD in !GeoServer: |
344 | | * http://ian01.geog.psu.edu/geoserver_docs/data/naturalearth/naturalearth_physical.html |
345 | | |
346 | | Scale-dependent styling in !OpenLayers: |
347 | | * http://docs.openlayers.org/library/feature_styling.html#custom-rules |
348 | | |
349 | | Simplifying Polygons in PostGIS: |
350 | | * http://linfiniti.com/2011/06/scale-dependent-generalization-in-postgis-and-qgis/ |
351 | | |
352 | | Showing the different layers at different zooms using !GeoServer: |
353 | | * http://docs.geoserver.org/stable/en/user/tutorials/feature-pregeneralized/feature-pregeneralized_tutorial.html |
354 | | {{{ |
355 | | cd |
356 | | wget http://kent.dl.sourceforge.net/project/geoserver/GeoServer%20Extensions/2.1.0/geoserver-2.1.0-feature-pregeneralized-plugin.zip |
357 | | cd /var/lib/tomcat6/webapps/geoserver/WEB-INF/lib/ |
358 | | unzip ~/geoserver-2.1.0-feature-pregeneralized-plugin.zip |
359 | | /etc/init.d/tomcat6 restart |
360 | | }}} |
361 | | ==== Add WMS Layer to Sahana Eden ==== |
362 | | * ''tbc'' |
363 | | |
364 | | === WMS Reprojection === |
365 | | * Have a remote WMS source that you want to access? |
366 | | * Have a desire to keep !OpenStreetMap/Google/Bing layers? |
367 | | * WMS source server doesn't support the 900913 projection? |
368 | | |
369 | | e.g. TRMM Rainfall Monitoring |
370 | | |
371 | | Solution: [wiki:InstallationGuidelinesGISDataLinux#ConfigurationforTRMM MapProxy] |
372 | | === Grid === |
373 | | We have a 'Coordinate Grid' Layer available by default. |
374 | | |
375 | | Other options: |
376 | | * [wiki:BluePrintGISGrid] |