Skip to content

Instantly share code, notes, and snippets.

@afonsoaugusto
Last active October 24, 2017 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afonsoaugusto/367634d182ef1bbd34ac5d9b5fabde1a to your computer and use it in GitHub Desktop.
Save afonsoaugusto/367634d182ef1bbd34ac5d9b5fabde1a to your computer and use it in GitHub Desktop.
#No arquivo zip, ele irá conter este conjunto de arquivos:
#tl_2013_us_zcta510.prj
#tl_2013_us_zcta510.shx
#tl_2013_us_zcta510.shp
#tl_2013_us_zcta510.dbf
#tl_2013_us_zcta510.shp.xml
#Para realizar o import é necessário que todos estejam na pasta informada
ogr2ogr -f <Plataforma> MySQL:<DatabaseName>,host=localhost,user=root,password=root <caminho com os arquivos>/<arquivo shape>.shp -nln <tabela de será importada> -update -overwrite -lco engine=MYISAM
ogr2ogr -f MySQL MySQL:geo_loc,host=localhost,user=root,password=root /home/mvp/Downloads/tl_2013_us_zcta510.shp -nln points_new -update -overwrite -lco engine=MYISAM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment