Moore Spatial

GIS and Related Pursuits

By

Dual Chloropleth With Proportional Symbols.

About: Dual chloropleth maps with proportional symbols. These maps show some figures about Minnesota’s population. Done in ArcGis 10.1
Date: April 16, 2013
 
Dual Chloropleths with proportional symbology

Dual Chloropleths with proportional symbology

By

Shaded Relief and Inset Maps

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
 
Shaded Relief Map With Inset

Shaded Relief Map With Inset

By

Create a Grid in PostGIS With Just SQL

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

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

SELECT 
(ystep/1000 + 1) * 5 - 5 + xstep/1000 + 1 as key, -- number grids in order across the top first, then down

st_setsrid( 
    st_makebox2d(
        st_translate(topleft,xstep,ystep*-1), 
        st_translate(topleft,xstep + 1000,ystep*-1 - 1000)
    ), 
    900913
) as way 

FROM 
(
    SELECT 
    xstep,
    ystep,
    st_point(0,0) AS topleft -- Top left starting point
    FROM
    ( 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
ON grid 
USING gist
(way);

ALTER TABLE grid ADD PRIMARY KEY (key);