Web Mapping Using the Leaflet API: An introduction to the basics of creating a simple web map using Leaflet.js. Topics will include setting up a new map, configuring center and zoom levels, adding points of interest, and creating popups. A breif introduction to HTML and GeoJSON will also be provided. This presentation will be code heavy, and basic familiarity with programming terms (functions, variables) is expected.
The sample code and presentation are available on GitHub.
About: This map was created using a DEM and the Hillshade toolbox in ArcGis 10.1. The inset map reflects the extent of the large map. The roads layer ended up too light, but I like the colors.
Date: April 4, 2013
About: PostGIS is a lot of fun. Here I generate a grid of 1x1km squares with just an SQL query.
Date: March 10, 2013
A generated grid viewed in QGis
The SQL used was:
-- Create a grid with just a query and number the squares
-- The grid squares are in meters, so you'll need a projection that is in meters.
-- The 900913 projection used is fine.
-- This query needs a couple of parameters
-- Starting point: st_point(0,0)
-- Total width of grid and width of each square: generate_series(0,4000,1000) (xstep)
-- Total height of grid and height of each square: generate_series(0,4000,1000) (ystep)
-- The height per square is used throughout the query (the scattered 1000s)
-- The number of squares is used in generating the numbering (The two 5s)
-- DROP TABLE grid;
CREATE TABLE grid AS
(ystep/1000 + 1) * 5 - 5 + xstep/1000 + 1 as key, -- number grids in order across the top first, then down
st_translate(topleft,xstep + 1000,ystep*-1 - 1000)
) as way
st_point(0,0) AS topleft -- Top left starting point
( SELECT generate_series(0,4000,1000) as xstep) as xstepq, -- series from 0 to 4000, with 1000 meter steps
( SELECT generate_series(0,4000,1000) as ystep) as ystepq
) AS factors ;
CREATE INDEX gridway
ALTER TABLE grid ADD PRIMARY KEY (key);