Bring in a Map from ArGIS
Open up a mxd and export out the layer styling
Create a folder called webmapping in your geog413 folder, then open up ArcMap and load the mxd in /home/labs/geog413/data/webmapping – powderking
While Powder King is loading into ArcMap, Copy the folder /home/emmons/software/arcmap2slp to your geog413 folder
Once the folder is copied go back to ArcMap and:
- Remove the raster layers
- Open the file explorer in osmotar and navigate to your geog413 folder and then to –> arcmap2sld\ArcMap2SLD_Code_1.4.0\prg\src\bin
- Double click on ArcGIS_SLD_Converter (this may not work) – Scott can help you set it up afterwards if you wish
- Extras menu –> Layers –> in separate files
- Pick a folder to save your styles
Open the data from the Arcmap in QGIS
- Load the layers in the webmapping folder in the geog413 lab folder
- Right click on each layer and change the style by Properties –> style tab –> style button –> load style –> Navigate to the same folder –> set the type of tile to SLD –> pick the name of the file that matches the layer
- Repeat for all layers (they are now the same as in ArcGIS)
- If you have not loaded the raster layers in the same folder – load the DEM (Powder_king.tif) and the shaded relief (powder_king_hillshade)
- Set the style of the raster layers to approximate the same as in ArcMap
Create a Web Map
First we need create a web accessible folder and add another Plugin –> called Qgis2web.
Create a folder called geog413 in your public_html folder (you may need to create a public_html folder in your home folder (not in your geog413 folder).
Once the folder is created and the plugin installed, we will use it to make a map by:
- Web –> qgis2web –> create a map
- You should be able to leave the layers setup as is
- Pick a folder to export to (the folder you just created)
- Then use the settings as in the image below
- You are ready to export your map
- Hit Export and look at the tasks undertaken while the map is being created
- It should automatically load into Firefox
- You can change the address of the loaded page by substituing “file:///home/username/public_html” with “http://gis.unbc.ca/~username” – now you are sharing on the web
Fix the map
The raster layers do not behave the way we had hoped – so:
- Turn off the DEM and Shaded relief layers and add in the powderking_map.tif raster layers
- Now export your map again – if should now look better
- Play around with the map – try clicking on the layers
Sharing up layers using OGC standard (Web Map Services)
Sharing data via web services is a common way of allow others to see what work you have produced. We are going to share the data we have through WMS. This can be used in web mapping applications that are attached to to databases and such. To set this up perform the following steps:
- Save your project to your geog413/webmapping folder – call it geogtest.qgs
- Now you can simply load the data back into the project by adding a WMS layer (the first globe)
- Create a new connection –> give it a name of “testgeog413″ –> add the address below to the URL (replace the folder location to your .qgs file):
- Hit “OK”
- Now hit “connect” –> choose layers –> make sure you select the image encoding ad “png”
You may want to start a new project and set on the fly projection to 3857 (pseudo mercator). You can also load layers from your classmates, you just need to know where their project file is.
Again we are just scratching the surface of web mapping, but we can see the methods by which we can share data.
Assignment – Due March 22 (or before of course)
Using FME translate Trim sheets (X4 – in a square),
Create DEM and vector output layers for : lakes, rivers, roads, islands
Bonus – make lakes (all of them) into polygons!
All layers but the DEM will be in a spatialite database
Create a postgis database add in the data from the spatialite database.
Make connections to your trim database.
Create a web map of the DEM with hillshading with the Lakes, roads and
rivers layers (save it to your public_html folder).
The 1:20000 MapSheet layer for BC is in the /home/dtata/bc_20K_mapsheets folder.
Scott has created a FMW (/home/labs/geog413/webmapping/saif2spatialite_geotif.fmw) – file that can be used to model your data using FME. (hint: It appears that you can only run one hullaccumulator at one time).
A written report detailing the steps you took to complete the tasks above (including screenshots). This should also include the problems you may have had with the assignment…
The location of your QGIS project, Web Map location and FMW files. This includes the project for your WMS output as well as the web map.
The mxd file location if you use ArcMap.