Skip to content

Commit

Permalink
add geojson
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcfrancisco committed Jul 10, 2024
1 parent 72c7ac8 commit 10d3b87
Show file tree
Hide file tree
Showing 7 changed files with 43,923 additions and 22 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ postgres = { version = "0.19.7", features = ["with-serde_json-1"] }
geo = "0.28.0"
wkb = "0.7.1"
bytes = "1.6.0"
geojson = "0.24.1"
serde_json = "1.0.120"
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,23 @@ brew install popgis

**Flags**

`input`: choose the *shapefile* or *geojson* file to insert into a PostGIS database.
`input`: choose the *geojson* or *shapefile* file to insert into a PostGIS database.

`uri`: the PostGIS database where you'd like to insert the input data.

`schema`: where you would like to insert the table. *This is optional.*
`schema`: where you would like the specified table. **This is optional**. *Default is public.*

`table`: choose the name of the resulting table. *Default is public*.
`table`: choose the name of the resulting table.

**Example**
**Examples**
```bash
## GeoJSON -> PostGIS ##
popgis --input spain.geojson \
--uri postgresql://my_username:my_password@localhost:5432/my_database \
--schema osm \
--table waters

## ShapeFile -> PostGIS ##
popgis --input water_polygons.shp \
--uri postgresql://my_username:my_password@localhost:5432/my_database \
--schema osm \
Expand All @@ -31,15 +38,12 @@ popgis --input water_polygons.shp \
## Benchmarks
*Upcoming...*

## Limitations
Currently, only ShapeFile files are implemented.

## Future implementation
The list below contains the upcoming implementations.

To do:

* Allow GeoJSON as input.
* <del>Allow GeoJSON as input.</del>

## License
See [`LICENSE`](./LICENSE)
Loading

0 comments on commit 10d3b87

Please sign in to comment.