项目作者: rtbigdata

项目描述 :
Import Shapefile geospatial vector format into MongoDB
高级语言: Python
项目地址: git://github.com/rtbigdata/shp-mongo-import.py.git
创建时间: 2017-05-28T17:34:32Z
项目社区:https://github.com/rtbigdata/shp-mongo-import.py

开源协议:

下载


shp-mongo-import.py

Import Shapefile geospatial vector format into MongoDB

Fast shapefile import into MongoDB using Python

Before running ensure you have the PyMongo module installed:

pip install pymongo

This script also has a dependency on the GDAL/OGR library, which can be obtained from here:
https://pypi.python.org/pypi/GDAL

Example usage:

python shp-mongo-import.py -f shapes.shp -d geospatial -c shapes

Additional parameters are required if your server is not on your local machine or if your database requires authentication. Use the “—help” flag or see the example below.

python shp-mongo-import.py -f shapes.shp -s host.example.com -d mydb -c shapes -u user -p password

Script requires MongoDB 3.2 or higher (prior releases do not support bulk operations), and was developed using Python 2.7 and a MongoDB 3.4 server.