org.h2gis.drivers.osm
Class OSMTablesFactory

java.lang.Object
  extended by org.h2gis.drivers.osm.OSMTablesFactory

public class OSMTablesFactory
extends Object

Class to create the tables to import osm data An OSM file is stored in 10 tables. (1) table_prefix + _node : table that contains all nodes, (2) table_prefix + _node_tag : table that contains a list of tags (key, value) for each node, (3) table_prefix + _way : table that contains all ways with their geometries, (4) table_prefix + _way_tag : table that contains a list of tags (key, value) for each way, (5) table_prefix + _way_node : table that contains the list of nodes used to represent a way, (6) table_prefix + _relation: table that contains all relations, (7) table_prefix + _relation_tag : table that contains a list of tags (key, value) for each relation, (8) table_prefix + _node_member : table that stores all nodes that are referenced into a relation, (9) table_prefix + _way_member : table that stores all ways that are referenced into a relation, (10) table_prefix + _relation_member : table that stores all relations that are referenced into a relation. (11) table_prefix + _relation_member : table that stores all relations that are referenced into a relation.

Author:
Erwan Bocher

Method Summary
static PreparedStatement createNodeMemberTable(Connection connection, String nodeMemberTable)
          Create the node members table
static PreparedStatement createNodeTable(Connection connection, String nodeTableName, boolean isH2)
          Create the nodes table that will be used to import OSM nodes Example :
static PreparedStatement createNodeTagTable(Connection connection, String nodeTagTableName, String tagTableName)
          Create a table to store the node tags.
static PreparedStatement createRelationMemberTable(Connection connection, String relationMemberTable)
          Store all relation members
static PreparedStatement createRelationTable(Connection connection, String relationTable)
          Create the relation table.
static PreparedStatement createRelationTagTable(Connection connection, String relationTagTable, String tagTableName)
          Create the relation tags table
static PreparedStatement createTagTable(Connection connection, String tagTableName)
          Create the tag table to store all key and value
static PreparedStatement createWayMemberTable(Connection connection, String wayMemberTable)
          Create a table to store all way members.
static PreparedStatement createWayNodeTable(Connection connection, String wayNodeTableName)
          Create a table to store the list of nodes for each way.
static PreparedStatement createWayTable(Connection connection, String wayTableName, boolean isH2)
          Create the ways table that will be used to import OSM ways Example :
static PreparedStatement createWayTagTable(Connection connection, String wayTagTableName, String tagTableName)
          Create a table to store the way tags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createTagTable

public static PreparedStatement createTagTable(Connection connection,
                                               String tagTableName)
                                        throws SQLException
Create the tag table to store all key and value

Parameters:
connection -
tagTableName -
Returns:
Throws:
SQLException

createNodeTable

public static PreparedStatement createNodeTable(Connection connection,
                                                String nodeTableName,
                                                boolean isH2)
                                         throws SQLException
Create the nodes table that will be used to import OSM nodes Example :

Parameters:
connection -
nodeTableName -
Returns:
Throws:
SQLException

createNodeTagTable

public static PreparedStatement createNodeTagTable(Connection connection,
                                                   String nodeTagTableName,
                                                   String tagTableName)
                                            throws SQLException
Create a table to store the node tags.

Parameters:
connection -
nodeTagTableName -
tagTableName -
Returns:
Throws:
SQLException

createWayTable

public static PreparedStatement createWayTable(Connection connection,
                                               String wayTableName,
                                               boolean isH2)
                                        throws SQLException
Create the ways table that will be used to import OSM ways Example :

Parameters:
connection -
wayTableName -
Returns:
Throws:
SQLException

createWayTagTable

public static PreparedStatement createWayTagTable(Connection connection,
                                                  String wayTagTableName,
                                                  String tagTableName)
                                           throws SQLException
Create a table to store the way tags.

Parameters:
connection -
wayTagTableName -
tagTableName -
Returns:
Throws:
SQLException

createWayNodeTable

public static PreparedStatement createWayNodeTable(Connection connection,
                                                   String wayNodeTableName)
                                            throws SQLException
Create a table to store the list of nodes for each way.

Parameters:
connection -
wayNodeTableName -
Returns:
Throws:
SQLException

createRelationTable

public static PreparedStatement createRelationTable(Connection connection,
                                                    String relationTable)
                                             throws SQLException
Create the relation table.

Parameters:
connection -
relationTable -
Returns:
Throws:
SQLException

createRelationTagTable

public static PreparedStatement createRelationTagTable(Connection connection,
                                                       String relationTagTable,
                                                       String tagTableName)
                                                throws SQLException
Create the relation tags table

Parameters:
connection -
tagTableName -
relationTagTable -
Returns:
Throws:
SQLException

createNodeMemberTable

public static PreparedStatement createNodeMemberTable(Connection connection,
                                                      String nodeMemberTable)
                                               throws SQLException
Create the node members table

Parameters:
connection -
nodeMemberTable -
Returns:
Throws:
SQLException

createWayMemberTable

public static PreparedStatement createWayMemberTable(Connection connection,
                                                     String wayMemberTable)
                                              throws SQLException
Create a table to store all way members.

Parameters:
connection -
wayMemberTable -
Returns:
Throws:
SQLException

createRelationMemberTable

public static PreparedStatement createRelationMemberTable(Connection connection,
                                                          String relationMemberTable)
                                                   throws SQLException
Store all relation members

Parameters:
connection -
relationMemberTable -
Returns:
Throws:
SQLException


Copyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.