Tag Archives: Featured

Testing Coordinate Transformation in PostGIS

I spend a lot of time thinking about which projection to use for a certain project,. Sometimes picking the perfect projection bites me when things change (such as the area of interest expands). In my recent case I have been avoiding reprojecting my data because I haven’t done this before in PostGIS and I’ve been convinced that this will be a major undertaking. After a minute’s worth of research I realize I may have been dead wrong. In fact, the process seems so easy and quick that I am leery. So here it is, my attempt at convincing myself that reprojecting in PostGIS is an inconsequential task.

First I will create some test data using a table in UTM 17 N meters (EPSG:26917).


Let’s prove this worked:

SELECT 'Table_SRID' as INFO,find_srid('public', 'ProjTest', 'geom')
SELECT st_AsText(geom), st_SRID(geom) FROM "ProjTest";



Next we’ll do the transformation to US National Atlas Equal Area

ALTER COLUMN geom TYPE geometry(Point,2163)
USING ST_Transform(geom,2163);

Then check the results:


Finally let’s display it in QGIS:

First I’ll leave the project projection in QGIS to UTM 17N, looks as expected.

Just to double check, I’ll change the project projection to 2163. Surprisingly things look crazy. Notice that the offset is not predictable, meaning that it might not be a datum shift.

Interestingly, projecting “on the fly” to other coordinate systems does not reproduce this offset. So, perhaps it is the Google Physical web service that I am using that is having problems with reprojecting to US National Atlas Equal Area and not the reproduction of the points. To test that, we will reproject one of the coordinates back to UTM from US National Atlas Equal Area using gdal.

gdaltransform -s_srs EPSG:2163 -t_srs EPSG:26917
1480246.71738073 -990001.583001807

Original = 250230.930254224, 3854029.95272766
GDAL Transformation = 250230.930251404, 3854029.95272553

Looks like the reprojection was successful, just need to figure out the problems with reprojecting the base map.

In summary, reprojecting data in PostGreSql is trivial. The work can be done in place and scripts are very succinct. I am extremely pleased with this implementation, thanks guys!

GeoForst Lite, Adding a New Property – Part 2


Last time we downloaded and configured the software and data sources we needed to start adding data to the project. If you missed it, just visit Getting Started with GeoForst Lite.

If your familiar with GIS, this post won’t be worth much, but skimming through will get you familiar with some of the datasets. In this post we are focusing on adding data to the Land_Area table which acts as a container for properties.

Alternately, if you aren’t familiar with GIS, this will give you enough knowledge to add a property to the map. There are links to some QGIS tutorials in the post that are worth visiting.

Helpful Items

There are a few things that your should have or know before you start, if possible. Here are a few that may help you on your project:

  • The ability to find your property on a map.
  • A platt map, or some other map of the boundaries and corners of your property.
  • Intimate knowledge of your land.

Adding a property

The first thing we want to do is add the boundary of your property, so we have an area to work within. Before we do that we need to find the property somehow in the map. This is where the osmSearch plugin will help. To make the osmSearch panel visible go to the View menu View > Panel > osmSearch. You can dock this anywhere you like, or not, your choice.

Adding osmSearch panel.

For this turn on the Google Physical layer that we added through the OpenLayers plugin and type in the city and state of the location into the osmSearch panel and hit Search. The location will then appear in the results field. Clicking on the result will pan you to the location you chose. Unfortunately it will not zoom, so you’ll need to choose an appropriate scale, 1:500,000 is a good place to start.

Note: osmSearch will highlight the feature you searched for in red, which can be annoying once you’ve zoomed in to the location. Dismiss it by clicking the “x” in the right hand corner of the search text box.

Zoom to place

At this point you should be able to find your property and zoom into so that the entire property is just visible. You probably want to turn off the Google Physical layer and turn on the Bing Aerial layer once you start zooming in, you’ll have to feel that transition out for yourself.


Adding a Property to the Map

Next will will edit the layer named “Land Areas” to add the property boundary. To do this select the layer, right click on it, and select toggle editing. At this point the layer is ready for editing.


Click on the add feature button on the editing toolbar and begin delineating your property by digitizing the boundaries. For more information on editing layers in QGIS, visit digitizing an existing layer.


Digitize your property boundary and add the attributes as shown below.
Adding Property Attributes

Stop editing, and save your edits. You should have something like this:
Newly added property.

Save the project before you close down QGIS and next post we will add some forest stands.

GeoForst Lite, Getting Started – Part 1


GeoForst Lite is a standalone program consisting of three parts, QGIS, a local datastore, and a QGIS map.


  1. Download QGIS version 2.x and install.
  2. Download GeoForst Lite.
  3. Unzip GeoForst Lite and move it to any directory you choose. Your home or documents directory is a fine place for it.

Adding Plugins

At this point you should have the ability to start the QGIS. There are a couple of ways to make this easy. Let’s step through the process.

Begin by opening the QGIS application, it should open to a blank project. At this point we need to add a couple plugins to make life easy. To do this, select the Plugins menu and select Manage and Install Plugins….


Now we want the good stuff, so let’s enable the experimental plugins and we are ready to get our plugins.


Okay lets get two plugins, the OpenLayers plugin and the osmSearch plugin. OpenLayers will let us display a variety of excellent base layers such as Google Terrain and Bing Imagery. This is really fantastic stuff. The osmSearch plugin lets you find locations by place name, which beats finding a location by pan and zoom alone. Search for those Plugins and install them.

Installing the OpenLayers plugin…

Finally let’s add the OSM place search plugin…

At this point the setup is complete. Open the GForst_Lite.qgs file that you unzip and placed on your file system and there will be three layers under the External Layers group.


Note: The OpenLayers plugin layers need a kick in the pants to scale correctly when first added. Zoom in or pan a bit to force it to redraw. It’s wonky, but a small price to pay for a great addition to QGIS.

Next up

Adding Your Property to GeoForst.

Replacing the Water Pump on a Range Rover Classic

Replacing the water pump on a Rover seems like a pretty common thing to do, but I had a hard time find a good description of the process on the net. The site www.rangerovers.net has tons of great information, but oddly it was pretty devoid of water pump replacement for the classic. Since I went through this, I took some photos and thought I’d share what knowledge I gained.

First this is NOT a 30 min job as I read some where, but at the same time it isn’t as bad as it could be. Secondly, the correct tools are important for this job. One speciality tool that I would not do this without (I tried and failed) is a fan clutch wrench. I bought a universal for around $80 at Napa that actually worked. Also, you need 11, 12, and 13 mm wrenches and sockets (I won’t use SAE because it is redundant and unnecessary), a 36 mm wrench to take off the fan, and 1/2″ socket with an 8″ extension (sometimes you have to be flexible and be a hypocrite).

Okay down to brass tacks:

1) Remove the fan and fan shroud by first taking the four screws from the shroud and then using the fan clutch wrench and 36 mm wrench to remove the fan. Rotate the 36 mm wrench to the right to loosen while holding the fan clutch wrench in place.

Fan shroud removal

2) Loosen belt tensioner and remove belts from water pump.
Remove belts.

3) Remove the pulley in front of the fan. Time to use the fan clutch wrench.
pulley removal

4) Remove belt tensioner, which comes off automatically when you remove the bolts on the bottom left of the pump.
pulley removal

5) Loosen and rotate thingy in front of the far right side of the pump. I don’t know what this is, but it moves just enough to give you the room needed to get the pump inserted without knocking the gasket out of place.
pulley removal

6) Remove the pump by giving it a healthy whack with a 2×4 or, in my case, a log. Be sure all bolts are removed. After struggling a bit, I realized that there was one bolt remaining on thr far right attached to the thingy.
pulley removal

7) Clean old gasket material from remaining half. I was very lucky and the gasket stuck to the half of the pump that I removed.

8) Add gasket. I tried attaching the gasket to the new half of the pump which didn’t work. Instead I attached the gasket to the old half and after many tries was able to insert new pump without warping the gasket.
pulley removal

9) Install pump. Straight forward but must be done carefully to avoid damaging or warping the gasket. This took many tries.
pulley removal.

From here out it’s all previous steps in reverse. Finish off by filling up the coolant. You really don’t want to forget this!

pulley removal