Class: OsmImport::Target::PgBase
- Inherits:
-
Struct
- Object
- Struct
- OsmImport::Target::PgBase
show all
- Defined in:
- lib/osm_import/target/pg_base.rb
Defined Under Namespace
Classes: Connection, TargetEntry
Constant Summary
collapse
- GEOTYPES =
{ 'point' => 'POINT', 'line' => 'LINESTRING', 'polygon' => 'POLYGON', 'multiline' => 'MULTILINESTRING', 'multipolygon' => 'MULTIPOLYGON' }
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options
4
5
6
|
# File 'lib/osm_import/target/pg_base.rb', line 4
def options
@options
end
|
Instance Method Details
#geometry_type(type) ⇒ Object
24
25
26
|
# File 'lib/osm_import/target/pg_base.rb', line 24
def geometry_type(type)
GEOTYPES[type.to_s] or raise StandardError.new("Unknown geometry type #{type.inspect}")
end
|
#new_prefix ⇒ Object
14
15
16
|
# File 'lib/osm_import/target/pg_base.rb', line 14
def new_prefix
options[:new_prefix] or 'new_osm_'
end
|
#prefix ⇒ Object
6
7
8
|
# File 'lib/osm_import/target/pg_base.rb', line 6
def prefix
options[:prefix] or 'osm_'
end
|
#projection ⇒ Object
18
19
20
|
# File 'lib/osm_import/target/pg_base.rb', line 18
def projection
options[:projection]
end
|
#raw_prefix ⇒ Object
10
11
12
|
# File 'lib/osm_import/target/pg_base.rb', line 10
def raw_prefix
options[:raw_prefix] or 'raw_osm_'
end
|