Geography Reference
In-Depth Information
Use Default SRID
Click this checkbox to use the default SRID of -1. This is usually
a bad thing because none of your geometries will be associated
with a coordinate system as defined in the spatial_ref_sys table. It
is better to uncheck the box and enter the spatial reference ID in
the box.
Use Default Geometry Column Name
If this box is checked, the default geometry column name of “the_
geom” will be used when creating tables. If you want to use a
different name, uncheck the box, and enter the name you desire.
Global Schema
This drop-down box lists all schemas in your database. If you want
to create your new spatial tables in a schema other than “public,”
select it from the list.
File List
The file list contains all the shapefiles you have selected for load-
ing. You can edit the feature class and schema for each shapefile
entry by clicking the text or choosing the schema from the drop-
down list. Editing the feature class type can cause your import to
fail but may be needed in some circumstances. The file list also
shows the number of features in the shapefile and the name that
will be used to create the table.
Once you click the Import button, SPIT proceeds to process each file.
A progress bar displays the status as the import proceeds. As the files
are processed, they are removed from the list.
Although SPIT is a handy tool, it is also somewhat picky. You may find
that, depending on the feature type, some shapefiles can't be loaded.
For the fail-safe loading of shapefiles into PostGIS, use one of the meth-
ods described in Chapter 11 , Using Command-Line Tools, on page 174 .
Spatial Queries
Let's look at one last feature of spatial databases before we move on
to viewing data stored in PostGIS. One of the strengths of an OGC-
compliant database is the ability to do spatial queries. PostGIS provides
a wealth of both OGC and custom functions to perform queries based
on spatial relationships. Using SQL, we can find features that overlap,
intersect, touch, or are contained in/by another feature. We can also
transform coordinates on the fly, reprojecting them from one spatial
reference system to another.
 
 
Search WWH ::




Custom Search