#postgresql #kml #cli

bin+lib kml2pgsql

convert a kml file into a postgresql-compatible sql script

4 releases

0.2.1 Sep 24, 2021
0.2.0 Sep 24, 2021
0.1.1 Sep 23, 2021
0.1.0 Sep 23, 2021

#2267 in Database interfaces

GPL-3.0 and AGPL-3.0+

32KB
841 lines

kml2pgsql

Convert some kml files to a script suitable for loading into a postgresql database.

Installation

cargo install kml2pgsql

Usage

kml2pgsql 0.1.0
Abraham Toriz <categulario@gmail.com>
convert a kml file into a postgresql-compatible sql script

USAGE:
    kml2pgsql [OPTIONS] <FILE>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -g, --geom <NAME>      The name of the geometry column [default: geom]
        --id <COLUMN>      The column to use as (incremental) primary key [default: id]
    -s, --schema <NAME>    The schema for the new table [default: public]

ARGS:
    <FILE>    The kml input file

Building

First clone the project, then

cargo build --release

and use the binary located in target/release/kml2pgsql

Dependencies

~1.5MB
~26K SLoC