[mapserver-users] still have problem when add postgis layer on mapserver mapfile
pcreso at pcreso.com
pcreso at pcreso.com
Sun Aug 26 12:39:08 PDT 2012
I assume the getcapabilities request is working OK?
What happens when you open this in your browser:
http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map?service=WMS&version=1.3.0&request=getcapabilities
& what happens if you initialise the CRS in the mapfile with just the epsg code instead of the full WKT?
I assume you are looking to do something like this?
http://121.73.69.119/osm_nz.html
Cheers,
Brent Wood
--- On Mon, 8/27/12, Henrique Rennó <henrique.renno at gmail.com> wrote:
From: Henrique Rennó <henrique.renno at gmail.com>
Subject: Re: [mapserver-users] still have problem when add postgis layer on mapserver mapfile
To: "李杨" <gisyangli at gmail.com>
Cc: mapserver-dev at lists.osgeo.org, mapserver-users at lists.osgeo.org
Date: Monday, August 27, 2012, 4:56 AM
It seems your url is set wrong as mode is given twice. You have to pass layer=layer_name
2012/8/26 李杨 <gisyangli at gmail.com>
I try to load a postgis data layer on my mapfile, have problem when configure the mapfile done, then visit it using "http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map&mode=map&mode=map" on the browser address. , only a blank blue image return, with no expected dot info.
I can not figure out which step is have problem.
Provide background info:
ogrinfo for the database table:
jack at jack-Vostro-1450:/usr/lib/cgi-bin$ ogrinfo PG:"host=127.0.0.1 user=osm password=osm dbname=osm port=5432" osm_new_mainroads -summary
INFO: Open of `PG:host=127.0.0.1 user=osm password=osm dbname=osm port=5432'
using driver `PostgreSQL' successful.
Layer name: osm_new_mainroads
Geometry: Line String
Feature Count: 9704
Extent: (-9871463.421196, 3533052.471384) - (-9460289.228784, 4190971.740014)
Layer SRS WKT:
PROJCS["Popular Visualisation CRS / Mercator (deprecated)",
GEOGCS["Popular Visualisation CRS",
DATUM["Popular_Visualisation_Datum",
SPHEROID["Popular Visualisation Sphere",6378137,0,
AUTHORITY["EPSG","7059"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6055"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.01745329251994328,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4055"]],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
AUTHORITY["EPSG","3785"],
AXIS["X",EAST],
AXIS["Y",NORTH]]
FID Column = id
Geometry Column = geometry
osm_id: Integer (0.0)
name: String (255.0)
type: String (255.0)
tunnel: Integer (5.0)
bridge: Integer (5.0)
oneway: Integer (5.0)
ref: String (255.0)
z_order: Integer (5.0)
jack at jack-Vostro-1450:/usr/lib/cgi-bin$
--------------------------------------------------------------------------------------------
.map(uing in the link above : osg-google.map) info for configure:
MAP
NAME places1
STATUS ON
SIZE 800 800
EXTENT -9871463.421196 3533052.471384 -9460289.228784 4190971.740014
UNITS meters
IMAGECOLOR 153 179 204
WEB
IMAGEPATH "/var/www/output"
IMAGEURL "/output/"
END
LAYER
STATUS DEFAULT
NAME "places1"
DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"
TYPE POINT
CONNECTIONTYPE postgis
CONNECTION "host=localhost dbname=osm user=osm password=osm port=5432"
CLASS
NAME "places1_color"
COLOR 255 215 0
END
END
END
-------------------------
for a explanation , whenever set "DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"",
DATA "geometry from osm_new_mainroads", or
DATA "geometry from osm_new_mainroads using unique osm_id using srid 3875
is the same , a blank image return
-------------------------------------------------------
massperv version info:
./mapserv -v
MapServer version 6.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
I try to experiment it in two different laptop and can not get expected result.
Please those with experience help me., this problem qurrall me a lot this weeked.
Thanks a lot.
--
Yang LiGIS DeveloperP.R.China
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Henrique
-----Inline Attachment Follows-----
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120826/b2447116/attachment.htm>
More information about the MapServer-users
mailing list