Created
July 1, 2016 08:46
-
-
Save grav/859756dae0f5b6bed6d41051c6fe2b2f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -e "\n\n------------ select from ms sql" | |
sqlcmd -S geotesterapache.cloudapp.net -U sa -P xxx -d skm_test_db -Q "select top 1 * from matrikel" | |
echo -e "\n\n------------ try parsing the spatial data" | |
export C_STR='MSSQL:driver=ODBC Driver 13 for SQL Server;server=geotesterapache.cloudapp.net;database=skm_test_db;UID=sa;PWD=xxx;tables=matrikel' | |
ogrinfo --debug on "$C_STR" -sql "select top 1 * from matrikel" | |
echo -e "\n\n------------ try querying through postgresql" | |
service postgresql start | |
psql -c "create database geotest encoding=UTF8 template=template0;" | |
psql -d geotest -c "create extension postgis; create extension ogr_fdw;" | |
pgsql-ogr-fdw/ogr_fdw_info -s "$C_STR" -l matrikel | psql -d geotest -f - | |
psql -d geotest -c "select * from matrikel limit 10" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment