Wednesday, May 26, 2010

Swan River

MapInfo and QGIS

GOt river data from geoscience australia, was unimpressed with quality.

Used DEM to create new river outline. Due to poor resolution of DEM, the edge is quite jagged, but more closely resembles what can be seen in aerial photography on Google than the GA layer.

CReated new layer by using Vertical Mapper to create contours from DEM. I could only find this option within the Grid manager, go figure.

Made intervals quite small, seemed to pick well. Created new TAB file from interval that matched shape of river.

USed distance calculator tool in Mapinfo to calculate distance between GNAF points and new rriver TAB. For some reson, they all seem to aggregate to certain nodes. I think it might be due to the jagged shape of the river file, but I'm not sure. One way to check, would be to smooth out the river boundary and see how distance tool works once destination geometry has more nodes.

Note that the distance calculator is under tools, but not by default. It needs to be turned on by going into tool manager.

Distance calculator created lines between the GNAF points and the closest node in the river polygon. I then used QGIS to create nodes from the lines, which created 2 points for each line, as the lines were all dead straight - obviously as this is the shortest distance between 2 points.

QGIS>Vector>Geometry Tools>Extract nodes.

Then in Vertical Mapper, used the point inspection tool to add heights to the points.

From here, its a simple process of matching the two points - obviously the one with the larger height value is the property.

1 comment:

  1. Don't forget to sort on GNAF ID then height descending. This should keep the regular order of Origin followed by river, under the assumption that the River is always lower than the origin.

    =IF(A2=A3,(IF(E2>E3,"ORIGIN","RIVER")),"ERROR")

    ReplyDelete