Template:BC Basemap: Difference between revisions

From VOC Wiki
Jump to navigation Jump to search
imported>ScottN
No edit summary
imported>ScottN
fixed missing "}"
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#if:{{{lat|}}}|[http://libcwms.gov.bc.ca/wmsconnector/com.esri.wsit.WMSServlet/ogc_layer_service?VERSION=1.1.0&request=GetMap&SRS=EPSG:4326&BBOX=-{{#expr:{{{long|123}}}+0.5*{{{width|10}}}/(111.12*0.6427)}},{{#expr:{{{lat|50}}}-0.5*{{{height|10}}}/111.12}},-{{#expr:{{{long|123}}}-0.5*{{{width|10}}}/(111.12*0.6427)}},{{#expr:{{{lat|50}}}+0.5*{{{height|10}}}/111.12}}&WIDTH={{#expr:{{{width|10}}}*{{{scale|100}}}}}&HEIGHT={{#expr:{{{height|10}}}*{{{scale|100}}}}}&LAYERS=TRIM_EBM_OCEAN,TRIM_EBM_WATERBODIES,TRIM_EBM_WATERCOURSES,TRIM_EBM_WETLANDS,TWTR_LINES,TTRN_LINES,TCVR_POINTS,TCTR_LINES,TTRN_POINTS,TSRF_POINTS,TCTR_POINTS,WHSE_BASEMAPPING.TRIM_TEXT_ANNO,TWTR_ANNO,TTRN_ANNO,TSRF_ANNO,TMISC_ANNO,TCVR_ANNO,TCUL_ANNO,TCTR_ANNO,BCGS_GRIDNTS_BC_COASTLINE_POLYS_125M,NTS_BC_RIV_LAKE_WET_POLYS_125M,NTS_BC_COASTLINE_LINES_125M,NTS_BC_CONTOUR_LINES_125M,NTS_BC_MANMADE_LINES_125M,NTS_BC_TRANSPORT_LINES_125M,NTS_BC_TRANSPORT_POINTS_125M,NTS_BC_WATER_POINTS_125M,NTS_BC_LANDFORM_POINTS_125M,NTS_BC_ANNO,NTS_GRID,BC_RIV_LAKE_WET_POLYS_500M,BC_WATER_LINES_500M,BC_TRANSPORT_LINES_500M,BC_PROV_BOUNDARIES_LINES_500M,BC_MANMADE_LINES_500M,BC_MAJOR_CITIES_POINTS_500M,BC_WATER_POINTS_500M,BC_TRANSPORT_POINTS_500M,BC_SPOT_ELEVATION_POINTS_500M,BC_MANMADE_POINTS_500M,BC_WATER_POLYS_5KM,BC_BASEMAP_LINES_5KM_water,BC_BASEMAP_LINES_5KM_transport,BC_BASEMAP_LINES_5KM_boundary,DBM_7H_MIL_POPULATION_POINT,DBM_7H_MIL_BOUNDARIES_LINE,DBM_7H_MIL_DRAINAGE_LINE,DBM_7H_MIL_DRAINAGE_POLY,DBM_7H_MIL_ROADS_LINE,DBM_7H_MIL_PARK_POLY,DBM_7H_MIL_POLITICAL_POLY_PS,DBM_7H_MIL_POLITICAL_POLY_BC,DBM_7H_MIL_BATHYMETRIC_POLY,&STYLES=&FORMAT=PNG {{{link|BC Basemap}}}]|[http://libcwms.gov.bc.ca/wmsconnector/com.esri.wsit.WMSServlet/ogc_layer_service?VERSION=1.1.0&request=GetMap&SRS=EPSG:4326&BBOX=-{{{west|123.1}}},{{{south|49.9}}},-{{{east|122.9}}},{{{north|50.1}}}&WIDTH={{#expr:({{{west|123.1}}}-{{{east|122.9}}})*111.12*0.6427*{{{scale|100}}}}}&HEIGHT={{#expr:({{{north|50.1}}}-{{{south|49.9}}})*111.12*{{{scale|100}}}}}&LAYERS=TRIM_EBM_OCEAN,TRIM_EBM_WATERBODIES,TRIM_EBM_WATERCOURSES,TRIM_EBM_WETLANDS,TWTR_LINES,TTRN_LINES,TCVR_POINTS,TCTR_LINES,TTRN_POINTS,TSRF_POINTS,TCTR_POINTS,WHSE_BASEMAPPING.TRIM_TEXT_ANNO,TWTR_ANNO,TTRN_ANNO,TSRF_ANNO,TMISC_ANNO,TCVR_ANNO,TCUL_ANNO,TCTR_ANNO,BCGS_GRIDNTS_BC_COASTLINE_POLYS_125M,NTS_BC_RIV_LAKE_WET_POLYS_125M,NTS_BC_COASTLINE_LINES_125M,NTS_BC_CONTOUR_LINES_125M,NTS_BC_MANMADE_LINES_125M,NTS_BC_TRANSPORT_LINES_125M,NTS_BC_TRANSPORT_POINTS_125M,NTS_BC_WATER_POINTS_125M,NTS_BC_LANDFORM_POINTS_125M,NTS_BC_ANNO,NTS_GRID,BC_RIV_LAKE_WET_POLYS_500M,BC_WATER_LINES_500M,BC_TRANSPORT_LINES_500M,BC_PROV_BOUNDARIES_LINES_500M,BC_MANMADE_LINES_500M,BC_MAJOR_CITIES_POINTS_500M,BC_WATER_POINTS_500M,BC_TRANSPORT_POINTS_500M,BC_SPOT_ELEVATION_POINTS_500M,BC_MANMADE_POINTS_500M,BC_WATER_POLYS_5KM,BC_BASEMAP_LINES_5KM_water,BC_BASEMAP_LINES_5KM_transport,BC_BASEMAP_LINES_5KM_boundary,DBM_7H_MIL_POPULATION_POINT,DBM_7H_MIL_BOUNDARIES_LINE,DBM_7H_MIL_DRAINAGE_LINE,DBM_7H_MIL_DRAINAGE_POLY,DBM_7H_MIL_ROADS_LINE,DBM_7H_MIL_PARK_POLY,DBM_7H_MIL_POLITICAL_POLY_PS,DBM_7H_MIL_POLITICAL_POLY_BC,DBM_7H_MIL_BATHYMETRIC_POLY,&STYLES=&FORMAT=PNG {{{link|BC Basemap}}}]}}
{{#if:{{{lat|}}}|
[http://openmaps.gov.bc.ca/mapserver/base2?service=wms&request=getmap&LAYERS=TRIM_EBM_OCEAN,TRIM_EBM_WATERBODIES,TRIM_EBM_WATERCOURSES,TRIM_EBM_WETLANDS,TWTR_LINES,TTRN_LINES,TCVR_LINES,TCVR_POINTS,TCTR_LINES,TTRN_POINTS,TSRF_POINTS,TCTR_POINTS,TTXT_ANNO,TWTR_ANNO,TTRN_ANNO,TCVR_ANNO,TCUL_LINES,NTS_BC_RIV_LAKE_WET_POLYS_125M,NTS_BC_COASTLINE_LINES_125M,NTS_BC_CONTOUR_LINES_125M,NTS_BC_MANMADE_LINES_125M,NTS_BC_TRANSPORT_LINES_125M,NTS_BC_TRANSPORT_POINTS_125M,NTS_BC_WATER_POINTS_125M,NTS_BC_LANDFORM_POINTS_125M,NTS_BC_ANNO,NTS_250K_GRID,BC_RIV_LAKE_WET_POLYS_500M,BC_WATER_LINES_500M,BC_TRANSPORT_LINES_500M,BC_PROV_BOUNDARIES_LINES_500M,BC_MANMADE_LINES_500M,BC_MAJOR_CITIES_POINTS_500M,BC_WATER_POINTS_500M,BC_TRANSPORT_POINTS_500M,BC_SPOT_ELEVATION_POINTS_500M,BC_MANMADE_POINTS_500M,BC_WATER_POLYS_5KM,BC_BASEMAP_LINES_5KM_water,BC_BASEMAP_LINES_5KM_transport,BC_BASEMAP_LINES_5KM_boundary,DBM_7H_MIL_POPULATION_POINT,DBM_7H_MIL_BOUNDARIES_LINE,DBM_7H_MIL_DRAINAGE_LINE,DBM_7H_MIL_ROADS_LINE,DBM_7H_MIL_PARK_POLY,DBM_7H_MIL_POLITICAL_POLY_PS,DBM_7H_MIL_POLITICAL_POLY_BC,DBM_7H_MIL_BATHYMETRIC_POLY&version=1.1.1&STYLES=&SRS=EPSG:4326&BBOX=-{{ #expr:{{{long|123}}}+0.5*{{{width|5}}}/(111.12*{{#cos: ({{{lat|50}}}*{{#const:pi}}/180)}})}},{{ #expr:{{{lat|50}}}-0.5*{{{height|5}}}/111.12}},-{{ #expr:{{{long|123}}}-0.5*{{{width|5}}}/(111.12*{{#cos: ({{{lat|50}}}*{{#const:pi}}/180)}})}},{{ #expr:{{{lat|50}}}+0.5*{{{height|10}}}/111.12}}&WIDTH={{ #expr:{{{width|5}}}*{{{scale|110}}}}}&HEIGHT={{ #expr:{{{height|10}}}*{{{scale|110}}}}}&FORMAT=PNG {{{link|BC Basemap}}}]|
[http://openmaps.gov.bc.ca/mapserver/base2?service=wms&request=getmap&LAYERS=TRIM_EBM_OCEAN,TRIM_EBM_WATERBODIES,TRIM_EBM_WATERCOURSES,TRIM_EBM_WETLANDS,TWTR_LINES,TTRN_LINES,TCVR_LINES,TCVR_POINTS,TCTR_LINES,TTRN_POINTS,TSRF_POINTS,TCTR_POINTS,TTXT_ANNO,TWTR_ANNO,TTRN_ANNO,TCVR_ANNO,TCUL_LINES,NTS_BC_RIV_LAKE_WET_POLYS_125M,NTS_BC_COASTLINE_LINES_125M,NTS_BC_CONTOUR_LINES_125M,NTS_BC_MANMADE_LINES_125M,NTS_BC_TRANSPORT_LINES_125M,NTS_BC_TRANSPORT_POINTS_125M,NTS_BC_WATER_POINTS_125M,NTS_BC_LANDFORM_POINTS_125M,NTS_BC_ANNO,NTS_250K_GRID,BC_RIV_LAKE_WET_POLYS_500M,BC_WATER_LINES_500M,BC_TRANSPORT_LINES_500M,BC_PROV_BOUNDARIES_LINES_500M,BC_MANMADE_LINES_500M,BC_MAJOR_CITIES_POINTS_500M,BC_WATER_POINTS_500M,BC_TRANSPORT_POINTS_500M,BC_SPOT_ELEVATION_POINTS_500M,BC_MANMADE_POINTS_500M,BC_WATER_POLYS_5KM,BC_BASEMAP_LINES_5KM_water,BC_BASEMAP_LINES_5KM_transport,BC_BASEMAP_LINES_5KM_boundary,DBM_7H_MIL_POPULATION_POINT,DBM_7H_MIL_BOUNDARIES_LINE,DBM_7H_MIL_DRAINAGE_LINE,DBM_7H_MIL_ROADS_LINE,DBM_7H_MIL_PARK_POLY,DBM_7H_MIL_POLITICAL_POLY_PS,DBM_7H_MIL_POLITICAL_POLY_BC,DBM_7H_MIL_BATHYMETRIC_POLY&version=1.1.1&STYLES=&SRS=EPSG:4326&BBOX=-{{{west|123.05}}},{{{south|49.95}}},-{{{east|122.95}}},{{{north|50.05}}}&WIDTH={{ #expr:({{{west|123.05}}}-{{{east|122.95}}})*111.12*{{#cos: ({{{north|50.05}}}*{{#const:pi}}/180)}}*{{{scale|110}}}}}&HEIGHT={{ #expr:({{{north|50.05}}}-{{{south|49.95}}})*111.12*{{{scale|110}}}}}&FORMAT=PNG {{{link|BC Basemap}}}]}}<noinclude>


<noinclude>
==Notes==


Parameters:
The WMS server limits the maximum size of the image.
 
==Parameters==


There are 2 options to specify the bounding box.  Either use lat, long, width and height or use north, south, east and west.   
There are 2 options to specify the bounding box.  Either use lat, long, width and height or use north, south, east and west.   
Line 9: Line 13:
*lat: lattitude of the center of the map (default:50.00)
*lat: lattitude of the center of the map (default:50.00)
*long: longitude of the center of the map (default:123.00}
*long: longitude of the center of the map (default:123.00}
*height: height of the map in km (default:10km)
*height: height of the map in km (default:5km)
*width: width of the map in km (default:10km)
*width: width of the map in km (default:5km)
*scale: map scale in pixels / km (default:100 pixels/km)
*scale: map scale in pixels / km (default:110 pixels/km).  In order to get the most detailed contour lines (20m intervals), a minimum scale of 110 pixels/km is required.
*link: text to appear in the link
*link: text to appear in the link
*north: lattitude of top of bounding box
*north: lattitude of top of bounding box
Line 20: Line 24:
calculation notes
calculation notes


*1 nautical mile = 1.85200
*1 nautical mile = 1.85200km
*1 degree lattitude = 60 nautical miles = 111.12km
*1 degree lattitude = 60 nautical miles = 111.12km
*1 degree longitude = 111.12km * cos (lattitude)
*1 degree longitude = 111.12km * cos (lattitude)
*0.6427 = cosine (50).  This is required to adjust the longitude scale since the real world distance for one degree of longitude is proportional to the cosine of the lattitude.  Ideally this would be a call to a cosine function but I don't think the wiki can do that so I've pre-programmed it to 50 degrees lattitude for now.


test calculations:
test calculations:
Line 29: Line 32:
*{{#expr:{{{lat|50}}}+0.5*{{{height|10}}}/111.12}}
*{{#expr:{{{lat|50}}}+0.5*{{{height|10}}}/111.12}}
*{{#expr:{{{lat|50}}}-0.5*{{{height|10}}}/111.12}}
*{{#expr:{{{lat|50}}}-0.5*{{{height|10}}}/111.12}}
*-{{#expr:{{{long|123}}}+0.5*{{{width|10}}}/(111.12*0.6427)}}
*-{{#expr:{{{long|123}}}+0.5*{{{width|10}}}/(111.12*{{#cos: ({{{lat|50.1}}}*{{#const:pi}}/180)}})}}
*-{{#expr:{{{long|123}}}-0.5*{{{width|10}}}/(111.12*0.6427)}}
*-{{#expr:{{{long|123}}}-0.5*{{{width|10}}}/(111.12*{{#cos: ({{{lat|50.1}}}*{{#const:pi}}/180)}})}}
*{{#expr:{{{width|10}}}*{{{scale|100}}}}}
*{{#expr:{{{width|5}}}*{{{scale|120}}}}}
*{{#expr:{{{height|10}}}*{{{scale|100}}}}}
*{{#expr:{{{height|5}}}*{{{scale|120}}}}}
*{{#expr:({{{north|50.1}}}-{{{south|49.9}}})*111.12*{{{scale|100}}}}}
*{{#expr:({{{north|50.1}}}-{{{south|49.9}}})*111.12*{{{scale|120}}}}}
*{{#expr:({{{west|123.1}}}-{{{east|122.9}}})*111.12*0.6427*{{{scale|100}}}}}
*{{#expr:({{{west|123.1}}}-{{{east|122.9}}})*111.12*{{#cos: ({{{north|50.1}}}*{{#const:pi}}/180)}}*{{{scale|120}}}}}
*{{#const:pi}}
*{{#cos: (50*{{#const:pi}}/180)}}
 
==Known Layers==
 
For help with layer names, see [[online mapping#Provincial Basemap WMS]]
</noinclude>
</noinclude>

Latest revision as of 21:08, 23 July 2008

Expression error: Unrecognized punctuation character "{".&HEIGHT=1222.3199999999&FORMAT=PNG BC Basemap

Notes

The WMS server limits the maximum size of the image.

Parameters

There are 2 options to specify the bounding box. Either use lat, long, width and height or use north, south, east and west.

  • lat: lattitude of the center of the map (default:50.00)
  • long: longitude of the center of the map (default:123.00}
  • height: height of the map in km (default:5km)
  • width: width of the map in km (default:5km)
  • scale: map scale in pixels / km (default:110 pixels/km). In order to get the most detailed contour lines (20m intervals), a minimum scale of 110 pixels/km is required.
  • link: text to appear in the link
  • north: lattitude of top of bounding box
  • south: lattitude of bottom of bounding box
  • east: lattitude of right side of bounding box
  • west: lattitude of left side of bounding box

calculation notes

  • 1 nautical mile = 1.85200km
  • 1 degree lattitude = 60 nautical miles = 111.12km
  • 1 degree longitude = 111.12km * cos (lattitude)

test calculations:

  • 50.044996400288
  • 49.955003599712
  • -Expression error: Unrecognized punctuation character "{".
  • -Expression error: Unrecognized punctuation character "{".
  • 600
  • 600
  • 2666.88
  • Expression error: Unrecognized punctuation character "{".
  • {{#const:pi}}
  • {{#cos: (50*{{#const:pi}}/180)}}

Known Layers

For help with layer names, see online mapping#Provincial Basemap WMS