You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INFO: Open of `PG:host=127.0.0.1 user=postgres password=postgres port=5432 dbname=gmap'
using driver `PostgreSQL' successful.
1: province (Multi Polygon)
2: popplace (Point)
Get summary of 'province' layer
ogrinfo -ro PG:"host=127.0.0.1 user=postgres password=postgres port=5432 dbname=gmap" province -summary
Table "public.province"
Column | Type | Collation | Nullable | Default
------------+-----------------------------+-----------+----------+---------------------------------------
gid | integer | | not null | nextval('province_gid_seq'::regclass)
area | double precision | | |
perimeter | double precision | | |
province_ | double precision | | |
province_i | double precision | | |
status | character varying(30) | | |
name | character varying(30) | | |
name_e | character varying(30) | | |
name_f | character varying(30) | | |
reg_code | integer | | |
poly_featu | integer | | |
island | character varying(30) | | |
island_e | character varying(30) | | |
island_f | character varying(30) | | |
geom | geometry(MultiPolygon,3978) | | |
Indexes:
"province_pkey" PRIMARY KEY, btree (gid)
"province_geom_idx" gist (geom)
Working Mapfile Example Reprojecting PG Layer from 3978 to 4326
MAP
NAME "postgis"
STATUS ON
SIZE 400 300
SYMBOLSET "../etc/symbols.txt"
## latlong output extents
EXTENT -180 -90 180 90
UNITS DD
SHAPEPATH "../data"
IMAGECOLOR 255 255 255
FONTSET "../etc/fonts.txt"
# output projection
PROJECTION
"init=epsg:4326"
END
#
# Start of layer definitions
#
LAYER
NAME provinces
METADATA
"wms_title" "Land"
"wms_extent" "-2340603.750000 -719746.062500 3009430.500000 3836605.250000"
END
TYPE POLYGON
STATUS ON
CONNECTIONTYPE postgis
CONNECTION "host=127.0.0.1 user=postgres password=postgres port=5432 dbname=gmap"
DATA "geom FROM province USING unique gid using srid=3978"
# input projection / source projection of the data
PROJECTION
"init=epsg:3978"
END
CLASS
NAME "Land"
STYLE
COLOR 240 240 240
OUTLINECOLOR 199 199 199
END
END
PROCESSING "CLOSE_CONNECTION=DEFER"
TEMPLATE "ttt"
END # layer
END # Map File