New York Crime

Time based maps.  Studying crime stats this way sure beats looking at a database.

http://projects.nytimes.com/crime/homicides/map

Published in: on September 11, 2009 at 12:17 pm  Leave a Comment  

I miss my Jetta Diesel!

I had 2 of them, a 1992 and then a 2001.   Loved both cars.  Drove the 2001 for 320,000 km and enjoyed every minute, even when it wouldn’t start in the winter, the skirt under the engine kept falling down (never the same after I hit that fox at 130 km/hr), and yes the higher than average repair bills.  But what a joy to drive with the handling, the cornering, and just the general feeling of cruising down the road.  Every time I see a Jetta that looks like my old one I stop to stare and wonder if it could still be in use. Forgetting the last time you filled up was also great since the Jetta diesel only used 4.4 litres/100 km.  Could drive 1100 to 1200 km on a tank.  So this brings me to two reports, one giving the Total Quality Index (TQI) and the other  the J. D. Powers ranking where the numbers in the fourth column indicate the number of problems per 100 vehicles that were reported by owners in the survey.  The TQI not only looks at problems with the vehicles but also tries to measure the fun to drive factor.  So the question is…which report would you use to help you buy a vehicle?  I know which one I would use.

Published in: on July 4, 2009 at 12:01 am  Comments (1)  

Browser geolocation without GPS

The world is getting smaller!  You can now get your geographic location based on where you are browsing from.    There is a new version of Firefox (ver 3.5) that just came out with Geolocation built in.  Looks like smart phones and iphones will be getting more location based services in the near future.

Published in: on July 2, 2009 at 8:49 pm  Leave a Comment  
Tags:

Ontario Base Maps and WMS

Part 1- Downloading and viewing data from Geographynetwork

What is the Geography Network?

The Geography Network Canada is an online resource for finding and sharing Canadian geographic content, including maps and data from many of our country’s leading providers.

As a lot of people know you can display a map of Ontario based on Ontario Base Map data and download the data in a variety of projections and GIS formats.

The graphics are complete but a lot of the attribute data has been removed. To access the site, go to:

http://geographynetwork.ca

Nova Scotia, New Brunswick, and Manitoba also have information on this web site.

To get the Ontario data go to Ontario Base Map Data Available on the Geography Network Canada.  This link will give you most of the OBM layers including roads but if you want the road names you have to download from Ontario Road Network Data Available on the Geography Network Canada .

image001

If you go to OBM data, you can zoom into the area you want and then proceed to download by clicking on the bottom button on the toolbar (make sure popups are allowed in your browser first)

image003

You will then be presented with a new dialog box where you can enter your email address if registered already or you can register as a new user.  The data will be emailed to you.

image005

The FME Downloading dialog now appears where you can choose GIS format and projection.

image008

image009 image011

You can also select what layers you want to download or download them all and choose the ones you want later.

image013

Note: If you want the roads with the names write down the extents so you can enter the extents later when you go to Ontario Road Network Data Available on the Geography Network Canada.

You now check your e-mail for a zip file.

image015

Download the zip file and extract to a new folder.  I use Total Commander to view, edit, pack, unpack, copy, and move files, connect to network drives, and for ftp.

image017

You now start QGIS and load some of the layers.

image019

Part 2 Using WMS with Geographynetwork

You can also access the data from Geographynetwork through this link as a WMS.

http://www.geographynetwork.ca/wmsconnector/com.esri.wms.Esrimap/OBM_Full_I

Add the following to the end of the above link

?VERSION=1.1.1&REQUEST=GetCapabilities&SERVICE=WMS&

To get:

http://www.geographynetwork.ca/wmsconnector/com.esri.wms.Esrimap/OBM_Full_I?VERSION=1.1.1&REQUEST=GetCapabilities&SERVICE=WMS&

Note: For more on WMS see this link at Mapserver

When you click on this file a capabilities file will be downloaded called OBM_Full_I

Rename to OBM_Full_I.xml and double click on it.  It should open up in Internet Explorer.

Note: If the xml doesn’t open in IE and you want to change the file association;

Have a look at the capabilities files.  Some important parts:

projections which can be used to access these filesimage021info on each layer

image023

You can view the layers with a WMS Client.

image025

If you’re using QGIS go to Layer—Add WMS Layer and create a new link.

A list of layers available will be displayed, pick Arc Canada Water to test.

image027

Note: In MapWindows you must add the link plus the requests. i.e., http://www.geographynetwork.ca/wmsconnector/com.esri.wms.Esrimap/OBM_Full_I?VERSION=1.1.1&REQUEST=GetCapabilities&SERVICE=WMS&

So now we know that you can load a WMS layer in a Desktop GIS. What about Openlayers?

Here’s an example.

To view the code in Firefox enter ctrl+u

This works OK  but what if you want to overlay a GeographyNetwork WMS layer over Google maps?  Google maps uses its own projection, a Mercator projection.

image029

Figure   http://www.diversophy.com/petersmap.htm

The further north you go the more distortion there is.  For a discussion on this see this link.

Here is a Spherical Mercator Openlayers example that gets around this.

Here’s an example

Again you can use ctrl+u to view the code in Firefox.

The above example is based on downloading a shapefile from GeographyNetwork and using Mapserver to serve this file a WMS layer with the Google Projection.

Here is a link to the Mapserver Mapfile .

You can use Mapserver so that it consumes and serves the OBM layers in real time.

Published in: on June 28, 2009 at 10:59 pm  Comments (1)  

Looking for a GIS/Geomatics Job in Canada?

Looking for a GIS/Geomatics Job in Canada?

Published in: on June 25, 2009 at 9:30 pm  Leave a Comment  

Using Firebug to help debug javascript

An excellent extension to Firefox that helps debug javascript is called Firebug.  To add Firebug go to their homepage and download the version corresponding to the version of Firefox you have.  Once it is downloaded drag the *.xpi file to Firefox to install.

image001

Take the time to read how Firebug works and what it can do.

Here’s an example of how use it.  With Openlayers 2.8 there is a WMS-T example that displays cloud cover for different dates and times.  The initial bounds are around hurricane Katrina in New Orleans and I want to change it to Southern Ontario, Parry Sound area.   Here is part of the code for the wmst. html file.

image003

I will pan and zoom into the area I want displayed and open the Firebug console by typing cntrl+shift+L

I will type map.getExtent().toBBOX() and click run to get the current map extents. I can then copy and paste the new bounds back into the wmst.html file and save it.image005

Where FireBug also comes in handy is to point out where mistakes in coding have taken place.  For example, if I deleted the closing brackets at the end,  I would get an error message (bottom right)

When I click on this error it will tell me where the error is and  what’s wrong .

image009

Note that there is a Lite version for IE but I’ve never tried it.

Published in: on June 25, 2009 at 8:03 pm  Leave a Comment  
Tags: , ,

More ways to create a Mapserver Mapfile

I only started creating mapfiles about 5 years ago and used Notepad++.  I liked Notepad ++ over Windows Notepad because of the line numbers. When you forgot a quote or made a typing mistake Mapserver would point out the line number where the mistake was and it could be fixed very quickly.   I did try MapLab (now retired) but couldn’t get it to work the way I wanted.  There is a plug-in for Mapwindows that created a mapfile and a complete map application but was difficult to edit.   The plug-in in Quantum GIS works just the way I want…takes the drudgery out but still gives you lots of control on the map output.   A new program called mscompanion not only creates the Mapfile but will display the map.   Another interesting program called Mapserver Console creates a Mapfile from an ESRI ArcExplorer AXL file.

Published in: on June 25, 2009 at 1:32 am  Leave a Comment  
Tags: , ,

Creating Internet Maps becoming easier

In Open Source GIS software there are many changes taking place in both Desktop GIS and with Internet Mapping.  Some of the best Desktop GIS programs are:

Quantum GIS with GRASS

MapWindow

OpenJUMP

uDIG

gvSIG

Some of the best Open Source Internet Mapping software products are:

Mapserver

Geoserver

Mapguide (Open Source)

A new trend sparked by Google Maps API are based on javascript.

Google Maps API

OpenLayers

MapFish

Another thing that is happening is a coordinated effort to promote the developement of Open Source GIS through The Open Source Geospatial Foundation

A good history of Open Source GIS is a this wiki.

This blog will keep track of development in these areas and point out new directions in both Desktop GIS and Internet Mapping.

Cheers

Jack

Published in: on June 23, 2009 at 5:27 pm  Leave a Comment  
Follow

Get every new post delivered to your Inbox.