Geobase/NHN - OSM Map Feature

From OpenStreetMap Wiki
Jump to: navigation, search

Summary

This is the page for the chart showing the Geobase National Hydro Network (NHN) and comparing it with the OSM Map features.

The Geobase NRN Product (Data description) can be found here. http://www.geobase.ca/geobase/en/data/nhn/description.html

This page is a work in progress towards coming up with a mapping of the hydro network.

Download

You can download the data from here http://osm.progysm.com/rncan/geobase/nhn_rhn/ please check with the talk-ca@openstreetmap.org discussion list, to see who is working on which area.

GeoBase - NHN WMS Layer

The GeoBase product has a great WMS layer available, it lists all of the water features. The detail is not as extensive as the Toporama WMS (above), however this one shows the map features which are not available from Toporama. Such as;

  • Water Direction Flow
  • centerline of the water direction in lakes
  • water junctions are highlighted

http://wms.cits.rncan.gc.ca/cgi/wms_en.cgi?map=/export/wms/mapfiles/rhn/geobase_rhn.map&version=1.1.1&service=WMS&request=Getmap&layer=HYDRO_AGGREGAT&format=image/png&STYLE=default&layers=GEOBASE_RHN_NHN&

Script

See GeoBaseNHN2osm for the import script.

See GeoBaseNHN Map Features for the OSM Tag matching.

Imported Area

This shows the type of data that is being imported for the area. It renders with arrows exactly which way the water flows along with the names where avilable. The area is from here] GeobaseNHN sample area.jpg

Imported Data

DatasetName
Description
ISLAND
SLWATER
WATERBODY
FLOW
User
Remove duplicate?
02LC000 St-Jérôme, Laurentides-Est, Québec no completed completed no Yan Morin completed
02LD000 Lac La Minerve, Lac Simon, Québec no completed completed no Yan Morin -
02LE000 La Lièvre, Mont-Laurier, Québec completed completed completed no Yan Morin -
02LF000 Municipalité de Kiamika, Québec no completed completed no Yan Morin -
02LG000 Réservoir Baskatong, Québec no completed completed no Yan Morin -
02LH000 La Gatineau, Maniwaki, Québec no completed completed no Yan Morin -
02JE000 Témiscamingue (Ouest), Québec and Ontario East no in progress in progress no Yan Morin no
02KG000 Témiscamingue (Maniwaki-Ouest), Québec no completed completed no Yan Morin completed
02KJ000 Témiscamingue, Québec no completed completed no Yan Morin completed
02PE000 La rivière Ste-Anne, Beaupré, Québec no completed completed no Yan Morin -
08GABX1 Howe Sound in progress in progress in progress completed mbiker completed
08HE0X1 Tahsis Area no no completed completed Adam Dunn (Imports) completed
08MHBX1 Lower Mainland in progress in progress in progress in progress mbiker
08MHBX2 Chilliwack no no no, use canvec completed Adam Dunn completed
08NL001 Princeton/Similkameen River no no no completed wbski completed
08PA001 Manning Park/Skagit River no no no completed wbski completed


DatasetName: see GeoBase Data Selection

Possible Upload Process

We will use 08MHBX1 as an example. Download the NHN files for a basin from http://osm.progysm.com/rncan/geobase/nhn_rhn/08/nlflow/

Unzip:

for i in *gz; do gunzip $i; done

Merge, e.g. with osmsort.pl from http://osm2mp.googlecode.com/svn/trunk/osm2mp . Merge in JOSM etc is also possible:

perl osmsort.pl NHN_08MHBX1_1_0_HN_NLFLOW_1.*xml >08mhbx1.osm

Get rid of duplicated nodes: open in JOSM, run Validator, select Errors, click "Fix", Save .osm.

JOSM seems to have a bug: after validator, modified ways carry action='modify' attributes, even though the ways are brand new. This makes the .osm to be rejected by the API if uploaded with bulk_upload.py. So clean it:

sed -i -e "s/action='modify' //" 08mhbx1.osm

Now bulk upload it to OSM:

python bulk_upload.py -i 08mhbx1.osm -u user -p password -c 'Geobase NHN import, 08MHBX1 nnflow'

If it stops mid-way, just repeat it.

(to be updated with info on how to deal with conflicts with pre-existing OSM data).

Features

Hydro network models features as Hydrographic entities that are specialized by different types. A lake, river, dock and a dam are all examples of Hydrographic entities.

Some of these features are available in canvec, so the Google Docs chart can be used to cross-reference http://spreadsheets.google.com/ccc?key=0Am70fsptsPF2clAwc29KaXlGaGFwS1piUkxZWjc0ekE&hl=en


The base Hydrographic entity provides the following attributes of interest

Geobase Code
Definition
OSM attribute
Comments
nid A UUID identifier that uniquely identifies this entity. nat_ref=>uuid See GeoBase: Common Tags
datasetName The Geobase dataset that the entity comes from geobase_dataset=>value GeoBase: Common Tags
validityDate nhn_validityDate=>value


Many of the other entities provide the following 'common' attributes (See the HNH for a detailed list of which entities provide which attributes

Geobase Code
Definition
OSM attribute
Comments
name1 Official geographical name from the geographical name database. name=>value
name2 Official geographical name from the geographical name database. (Alternate name?)  ? How is this used in practice? Does this tend to give the french name? A local name?
nameDate The date at which the geographical name(s) was (were) associated to its (their) geographical name identifier. YYYYMMDD
nameId The geographical name identifier of the Name 1 attribute value from the geographical name database. name_id=>value


WaterBody

An area of water that is represented by a polygon, a WaterBody is an entity

The type of waterbody is described by the Water Definition attribute


A WaterBody maps to a closed area/polygon

WaterLine

Water that is represented by a single line on the map. A WaterLine is an entity

The type of waterline is described by the Water Definition attribute

GML Tag: gml2:NHN_HD_SLWATER_1

A WaterLine will map to a non-closed way/line

ShoreLine

A shore line makes up the border of a body of water.

Shorelines can be Banks or Littorals and are identified by the gml elements <NHN_HN_BANK_1> or <HNH_HN_NOTTORAL_1>


The shoreline provides the attributes

Geobase Code
Definition
OSM attribute
Comments
shorelineWaterLevel
permanency
waterbodyNid The node of the waterbody this is a shore of Used to form a relation?
waterDefinition See Water Definition attribute

Shorelines also are involved in junctions

Obstacles

A feature representing an obstacle that disturbs or impedes the natural flow of surface water. ([1] )

Obstacles can be described by lines (<NHN_HE_OBSTACLELN_6>) or points (<NHN_HE_OBSTACLEPT_6>)

The <gml2:obstacleType> element describes the obstacle type according to the list Obstacle Type


Man Made Entities

Man made entities describe man made objects used to access or control water[2]

They are described by the <NHN_HD_MANMADE_0> <HNH_HD_MANMADE_1> and <NHN_HD_MANMADE_2> GML elements.

The type of the feature is described by the <manMadeType> element according to the list Man Made Type

The status of the object is described by the GML element <manmadeStatus> according to the attribute list Man Made Status

Named Features

A named feature describes "A feature delineating the extent, in whole or in part, of a toponymic phenomenon for which the geometry does not fully correspond to that of another feature." [3]

Named features are identified by the GML elements <NHN_TO_NAMEDFEA_0> (point) <HNH_TO_NAMEDFEA_1> (line) and <NHN_TO_NAMEDFEA_2> (area)

Named features are part of the toponomy package and might not be included in the data for some regions.


Geobase Code
Definition
OSM attribute
Comments
geographicalNameDB The geographical name database that this name comes from
name The name of the feature as found in the geographical name database--> name=>value
nameDate The date at which the geographical name(s) was (were) associated to its (their) geographical name_date=>value
nameId The geographical name identifier from the geographical name database. geobase_name_id=>value
relatedNid The NID of the feature referenced by the Named Feature (foreign key).
entityType The nature of the named phenomenon. One of
  * 1 Marine Waterbody
  * 2 Fault Line
  * 3 Landscape
  * 4 MassIce
  * 5 Mountains
  * 6 Peninsula
  * 7 Undersea Feature
  * 8 Inland Water


Named features are used to provide names to features other than those described by the feature types defined in the hydro network.

Attribute Lists

Water Definition

Comes from the gml attribute gml2:waterDefinition and gml2:waterDefinitionText

Geobase Code
Definition
OSM attribute
Comments


0 (None)
1 (Canal) waterway=>canal
2 (Conduit)
3 (Ditch)
4 (Lake) natural=>water
5 (Resevoir)
6 (Watercourse)
7 (Tidal River) waterway=>river
8 (Liquid Waste)


9 (Pond) natural=>water



Obstacle Definition

The <obstacleType> attribute identifies the type of obstacle based on the following map


Geobase Code
Definition
OSM attribute
Comments
-1 (unknown) barrier=>
8 (other) barrier=>
2 (Rapids) barrier=>rapids
3 (Reef) barrier=>reef


4 (Rocks) barrier=>rocks


5 (Disappearing Stream)
6 (Exposed Shipwreck) barrier=>shipwreck
7 (Ford) barrier=>ford


Man Made Type

Geobase Code
Definition
OSM attribute
Comments
-1 (unknown)
0 (None)
2 (Dam) waterway=dam maybe? --acrosscanadatrails 06:49, 12 December 2008 (UTC)


3 (dock) waterway=>dock


4 (Breakwater) A structure used for breaking the force of waves to protect a beach, harbour, or other waterfront facilities.
5 (Dike)
6 (Lock) waterway=>lock_gate
7 (Ramp) leisure=slipway unless there is another tag for it? --acrosscanadatrails 06:46, 12 December 2008 (UTC)
8 (Fish Ladder)
9 (Slip) waterway=>mooring


Man Made Status

The Man Made Status attribute describes the operational condition of the manmade structure at a specified time.

Geobase Code
Definition
OSM attribute
Comments
-1 (unknown)
1 (Operational)
2 (Abandoned)

Attributes common to all entities

GeoBase NHN Feature GeoBase NHN Value OSM Key OSM Value Imported 2009-07-28
GEOMETRY outer;inner;point;line GEOMETRY Area Mf node.png Way
n/a n/a attribution GeoBase(r) attribution=Natural Resources Canada
n/a n/a source Geobase_Import_2009 source=GeobaseNHN_Import_2009
n/a n/a created_by geobaseNHN2osm created_by=geobaseNHN2osm (not always)
n/a n/a GeoBaseNHN:source GeoBase_NHN_Catalogue_1.0.1_EN.html Not used
NID 35466b119af747b98cd41e34bb6474af GeoBaseNHN:UUID 35466b119af747b98cd41e34bb6474af GeoBaseNHN:UUID=(database value) (not always)
VALDATE 1985 GeoBaseNHN:VALDATE 1985 GeoBaseNHN:VALDATE=(database value) (not always)
ACQTECH -1 GeoBaseNHN:ACQTECH Unknown GeoBaseNHN:ACQTECH=(english value) (not always)
ACQTECH 0 GeoBaseNHN:ACQTECH None GeoBaseNHN:ACQTECH=(english value) (not always)
ACQTECH 2 GeoBaseNHN:ACQTECH GPS GeoBaseNHN:ACQTECH=(english value) (not always)
ACQTECH 3 GeoBaseNHN:ACQTECH Orthoimage GeoBaseNHN:ACQTECH=(english value) (not always)
ACQTECH 4 GeoBaseNHN:ACQTECH Orthophoto GeoBaseNHN:ACQTECH=(english value) (not always)
ACQTECH 5 GeoBaseNHN:ACQTECH Vector Data GeoBaseNHN:ACQTECH=(english value) (not always)
ACQTECH 6 GeoBaseNHN:ACQTECH Paper map GeoBaseNHN:ACQTECH=(english value) (not always)
ACQTECH 6 GeoBaseNHN:ACQTECH Field completion GeoBaseNHN:ACQTECH=(english value) (not always)
DATASETNAM 02HA000 GeoBaseNHN:DatasetName 02HA000 GeoBaseNHN:DATASETNAM=(database value) (not always)
ACCURACY 10 GeoBaseNHN:Planimetric Accuracy (CMAS) 10 accracy:meters=(database value) (not always)
PROVIDER 1 GeoBaseNHN:PROVIDER Other GeoBaseNHN:PROVIDER=(english value) (not always)
PROVIDER 2 GeoBaseNHN:PROVIDER federal GeoBaseNHN:PROVIDER=(english value) (not always)
PROVIDER 3 GeoBaseNHN:PROVIDER provincial_territorial GeoBaseNHN:PROVIDER=(english value) (not always)
PROVIDER 4 GeoBaseNHN:PROVIDER municipal GeoBaseNHN:PROVIDER=(english value) (not always)
METACOVER -1 GeoBaseNHN:Object Metadata cover Unknown (not used)
METACOVER 0 GeoBaseNHN:Object Metadata cover no (not used)
METACOVER 1 GeoBaseNHN:Object Metadata cover yes (not used)

GeoBaseNHN Feature Type Chart

Area Mf node.png Way

GeoBase FILE_Name Package GeoBaseNHN Name(english) Geometry Definition
HN_BANK_1 Hydro Network Bank Way A feature delimiting all or part of a Waterbody feature.
HN_DELIMITER_1 Hydro Network Delimiter Way A virtual feature delimiting all or part of a Waterbody or dividing an Island feature.
#HE_OBSTACLELN? Hydro Events External Geometry Event Mf node.png A point event, positioned at the intersection of a Network Linear Element and a network type phenomenon stored in an external database, providing linkage attributes to the latter.
#HE_MANMADELN? Hydro Events External Line Event Way A linear event, positioned along a Network Linear Element, providing linkage attributes to a linear or area type phenomenon stored in an external database.
#HE_MANMADEPT? Hydro Events External Point Event Mf node.png A point event, positioned along a Network Linear Element, providing linkage attributes to a point or linear type phenomenon stored in an external database.
#HE_FLOWPROPLN? Hydro Events Flow Property Event Way A linear event, positioned along a Network Linear Flow, describing the properties of a body of water according to its water velocity and usage.
HD_OBSTACLE_2 Hydrographic Hydrographic Obstacle Entity Mf node.png Way Area A feature representing an obstacle that disturbs or impedes the natural flow of surface water.
HN_HYDROJUNCT_0 Hydro Network Hydro Junction Mf node.png A feature, always positionned at each end of a Network Linear Element, used to determine adjoining linear features to this last.
HD_ISLAND_2 Hydrographic Island Area Simple polygon feature defined by a single outer ring describing a land area surrounded by water. Add natural=land property for outer NID.
#HN_????_1? Hydro Network Littoral Way A feature representing the boundary between land and sea.
HD_MANMADE_2 Hydrographic Manmade Hydrographic Entity Mf node.png Way Area A feature representing a manmade structure constructed to facilitate access to a water resource or control water level.
HD_MANMADE_1 Hydro Events Manmade Line Event Way A linear event, positioned along a Network Linear Element, describing a line or area type Manmade Hydrographic Entity.
HD_MANMADE_0 Hydro Events Manmade Point Event Mf node.png A point event, positioned along a Network Linear Element, describing a point or line type Manmade Hydrographic Entity.
TO_NAMEDFEA_0 Toponymy Named Feature Mf node.png Way Area A feature delineating the extent, in whole or in part, of a toponymic phenomenon for which the geometry does not fully correspond to that of another feature.
HN_NLFLOW_1 Hydro Network Network Linear Flow Way A feature that traces the movement of water in a one-dimension virtual water flow route.
HD_OBSTACLE_1 Hydro Events Obstacle Line Event {IconWay}} A linear event, positioned along a Network Linear Flow, describing a line or area type Hydrographic Obstacle Entity.
HD_OBSTACLE_0 Hydro Events Obstacle Point Event Mf node.png A point event, positioned along a Network Linear Flow, describing a point or line type Hydrographic Obstacle Entity.
HD_SLWATER_1 Hydrographic Single Line Watercourse Way A linear feature describing the path of a narrow flow of water on the earth's surface.
HD_WATERBODY_2 Hydrographic Waterbody Area A polygon feature describing a body of water delimited by one or more Bank or Delimiter features.
WORKUNIT_LIMIT_2 n/a NHN Work Unit Limit Area Polygon delimiting an NHN dataset.



Geobase Import

Back to GeoBase Import page