Database Reference
In-Depth Information
$ shp2pgsql -s 4326 -W LATIN1 -g the_geom
-I TM_WORLD_BORDERS-0.3.shp
chp09.countries > countries.sql
Shapefile type: Polygon
Postgis type: MULTIPOLYGON[2]
$ psql -U me -d postgis_cookbook -f
countries.sql
How to do it...
Carry out the following steps:
1. MapServer exposes its map services using mapfile , a text file format, with
which it is possible to define the PostGIS layers on the Web, enable any
vector and raster format supported by GDAL, and specify which services
(WMS/WFS/WCS)toexposeperlayer.Createanewtextfilenamed coun-
tries.map and add the following code:
MAP # Start of mapfile
NAME 'population_per_country_map'
IMAGETYPE PNG
EXTENT -180 -90 180 90
SIZE 800 400
IMAGECOLOR 255 255 255
# map projection definition
PROJECTION
'init=epsg:4326'
END
# web section: here we define the ows
services
WEB
# WMS and WFS server settings
METADATA
'ows_enable_request' '*'
'ows_title'
Search WWH ::




Custom Search