I am learning postgis. This tutorial says "Navigate to where you downloaded the shapefile." Does that mean navigate to this location in the #psql prompt or navigate to this location with the $propmt? In other words: does the psql shell have a working directory in the file system that you can change with cd, like in *nix?

I am confused because the tutorial says to run shp2pgsql after navigating to that location -- but shp2pgsql is a postgres command, not a bashcommand. But the sql prompt lists tables, records etc -- which does not have to do with the file system. So does the sql prompt know about the file system or not?


If you are learning PostGIS using a Tutorial based on PostGIS 1.5, when the version number is up to 2.1 is a mistake. (Unless you are using 1.5)

This command shp2pgsql is a bash command that's pipe'd into your postgresql shell

shp2pgsql -c -D -s 4269 -I tl_2010_11001_tract10.shp dc_census_tracts | psql -d dc-census

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.