Monday, December 19, 2011

Accessing PostGIS database features from gvSIG

The PostGIS spatial database can be accessed by a variety of client software including gvSIG, FME, and even Intergraph's GeoMedia. It is possible to import features from GeoMedia into the PostGIS database and manipulated through an open source software like gvSIG. For instance, the example States feature in the screenshots below was imported to PostGIS via GeoMedia's Export Feature command.

In order for gvSIG to access and manipulate features in PostGIS, a GeoDB connection must be made first as shown below.
  1. Start gvSIG OADE 2010. Create a new View with the desired coordinate system, e.g. Albers Equal Area. Open the view.


  2. Select View | Add Layer.

    The Add Layer dialog box appears.

  3. Click the GeoDB tab.
  4. In the Connection field, click the New Connection button on the right.|

    The Connection Settings dialog box appears.

  5. In the Connection name field, type in a name e.g. PostGISConn1.
  6. In the Driver field, choose PostGIS JDBC Driver.
  7. In the Server URL or IP field, type in the address name or the IP address e.g. 192.168.1.99.
  8. In the Database name field, type in the PostGIS database name e.g. gdotest.
  9. In the User field, type in the database user name e.g. gdouser.
  10. In the Password field, type in the password of the database user e.g. gdouser.
  11. Click OK.

    If the values are correctly filled, the database would be connected to gvSIG. A list of tables appear

  12. In the table list field, toggle on one or more spatial tables e.g. public.states.
  13. Click Ok.

    The selected table(s) are displayed in the View.

No comments: