Close the Import/Export Manager application by clicking the X button in the upper right of the dialog or on the Cancel button.After just a moment, the Log Window area of the dialog should report that the import process has been completed. For now, it's sufficient to know that 4269 is the ID associated with the decimal degree/NAD83 coordinate system used by the Lesson 3 data. As with other GIS applications, defining a dataset's spatial reference is critical in enabling most of the functionality we typically need. This ID is set to 0 by default, a value that indicates the spatial reference of the shapefile is unknown. SRID: 4269 (After setting this last value, be sure to click away from the row of specifications or hit Enter otherwise, the last value changed may revert to its original value of 0.)īefore performing the import, let's spend a moment discussing the SRID ( Spatial Reference IDentification) setting. In the Import List section of the dialog (above the Add File button) supply the following settings by clicking on the current values under each heading:.In the middle of the dialog, click the Add File button and navigate to the location of your Lesson 3 data.Confirm that the PostGIS Connection parameters are set as follows:.At the top of the application window, click the View connection details button.Since we will be using this executable several times, I suggest that you make a desktop shortcut for it. If you encounter an error that the file "libintl-9.dll is missing," the easiest fix for this problem is to navigate up to the bin folder where libintl-9.dll is found, copy it, and paste it into the postgisgui folder. In Windows Explorer, browse to the following folder:Ĭ:\Program Files\PostgreSQL\15\bin\postgisgui.In pgAdmin 4, it must be run as a separate application. In prior versions of pgAdmin, the shapefile importer was accessible as a plug-in. Fortunately, some PostGIS developers have created a Shapefile Import/Export Manager that makes this conversion easy. Set the Owner of the schema to postgres.Ī common workflow for PostGIS users is to convert their data from Esri shapefile format to PostGIS tables. In the Create Schema dialog, specify a name of usa.Right-click on Schemas, and select Create > Schema.This schema will store data for the United States that we will use in the next two lessons. At this point, you should see only one schema: public. We'll have a look at the public schema soon but for now, let's create a new schema. Generally speaking when you begin a new project, you'll want to create a new schema. In Postgres, schemas are the containers for a set of related tables. We will next concern ourselves with schemas. (The settings you just established are reflected under the SQL tab.)Ĭlick Save to dismiss the Create Extension dialog. In the same dialog, select the Definition tab, and set the Version to 3.3.2. In the Create Extension dialog under the General tab, set the Name to postgis.Right-click on Extensions, and select Create > Extension. Now, click on the Lesson3db database to expand its list of contents.In the Create - Database dialog, set the Database to Lesson3db, and from the Owner list, select the postgres user name.Right-click on the Databases list, and choose Create > Database.We want to create a new database that is specific to our desire to use the PostGIS functionality. It was created when you installed Postgres. You should see at least one "starter" database: postgres. You should now see 3 nodes beneath the localhost server: Databases, Login/Group Roles, and Tablespaces. You will be logging in with the default user name of postgres.Įnter the password you defined earlier for the postgres account when you installed the software.
0 Comments
Leave a Reply. |