[mapserver-users] EPSG:900913 Problem
vinodverma
vinodkrverma at live.com
Mon Jul 8 23:04:59 PDT 2013
Hi
Thanks for the early reply. I have made changes as you have mentioned.
But still there is problem.
When I entered the following link in the url:
"http://localhost/mapcache/tms/1.0.0/osm@g/"
It show the message:
<TileMapService version="1.0.0"><TileMaps>
<TileMap title="OSM MapServer served map" srs="EPSG:4326"
profile="global-geodetic"
href="http://localhost/mapcache/tms/1.0.0/osm@WGS84"/>
<TileMap title="OSM MapServer served map" srs="EPSG:900913"
profile="global-mercator"
href="http://localhost/mapcache/tms/1.0.0/osm@g"/></TileMaps></TileMapService>
It means it is supporting srs EPSG:900913
But when I switched to EPSG:900913 the images goes blank and in the Error
console it show message
http://localhost/mapcache/tms/1.0.0/osm@g/1/0/0.png 502 (Bad Gateway)
When I checked my apace error log it show the message
[error] [client 127.0.0.1] wms request for tileset osm returned an
unsupported format:\n<?xml version='1.0' encoding="ISO-8859-1"
standalone="no" ?>\n<!DOCTYPE ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">\n<ServiceExceptionReport
version="1.1.1">\n<ServiceException
code="InvalidSRS">\nmsWMSLoadGetMapParams(): WMS server error. Invalid SRS
given : SRS must be valid for all requested
layers.\n</ServiceException>\n</ServiceExceptionReport>\n, referer:
http://localhost/mapcache/demo/tms
[Tue Jul 09 11:27:12 2013] [error] [client 127.0.0.1] tileset osm: unknown
error (another thread/process failed to create the tile I was waiting for),
referer: http://localhost/mapcache/demo/tms
[Tue Jul 09 11:27:12 2013] [error] [client 127.0.0.1] tileset osm: unknown
error (another thread/process failed to create the tile I was waiting for),
referer: http://localhost/mapcache/demo/tms
[Tue Jul 09 11:27:36 2013] [error] [client 127.0.0.1] File does not exist:
/var/www/favicon.ico
[Tue Jul 09 11:27:42 2013] [error] [client 127.0.0.1] CGI Request 1 on
process 3402
[Tue Jul 09 11:27:42 2013] [error] [client 127.0.0.1]
msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be
valid for all requested layers.
[Tue Jul 09 11:27:42 2013] [error] [client 127.0.0.1] wms request for
tileset osm returned an unsupported format:\n<?xml version='1.0'
encoding="ISO-8859-1" standalone="no" ?>\n<!DOCTYPE ServiceExceptionReport
SYSTEM
"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">\n<ServiceExceptionReport
version="1.1.1">\n<ServiceException
code="InvalidSRS">\nmsWMSLoadGetMapParams(): WMS server error. Invalid SRS
given : SRS must be valid for all requested
layers.\n</ServiceException>\n</ServiceExceptionReport>\n, referer:
http://localhost/mapcache/demo/tms
[Tue Jul 09 11:27:42 2013] [error] [client 127.0.0.1] tileset osm: unknown
error (another thread/process failed to create the tile I was waiting for),
referer: http://localhost/mapcache/demo/tms
[Tue Jul 09 11:27:42 2013] [error] [client 127.0.0.1] tileset osm: unknown
error (another thread/process failed to create the tile I was waiting for),
referer: http://localhost/mapcache/demo/tms
[Tue Jul 09 11:27:42 2013] [error] [client 127.0.0.1] tileset osm: unknown
error (another thread/process failed to create the tile I was waiting for),
referer: http://localhost/mapcache/demo/tms
I am not understanding where to make change my mapcache.xml file is like
this
<?xml version="1.0" encoding="UTF-8"?>
<mapcache>
<cache name="disk" type="disk">
<base>/home/osm-demo/mapcache/cache</base>
<symlink_blank/>
</cache>
<source name="osm" type="wms">
<getmap>
<params>
<FORMAT>image/png</FORMAT>
<LAYERS>default</LAYERS>
<MAP>/home/osm-demo/basemaps/osm-google.map</MAP>
</params>
</getmap>
<http>
<url>http://localhost/cgi-bin/mapserv</url>
</http>
</source>
<tileset name="osm">
<metadata>
<title>OSM MapServer served map</title>
<abstract>Testing the Map Server On Local Machine</abstract>
</metadata>
<source>osm</source>
<cache>disk</cache>
<grid>WGS84</grid>
<grid>g</grid>
<format>PNG</format>
<metatile>5 5</metatile>
<metabuffer>20</metabuffer>
<expires>10000</expires>
<auto_expire>86400</auto_expire>
</tileset>
<default_format>JPEG</default_format>
<service type="wms" enabled="true">
<full_wms>assemble</full_wms>
<resample_mode>bilinear</resample_mode>
<format>JPEG</format>
<maxsize>4096</maxsize>
</service>
<service type="wmts" enabled="true"/>
<service type="tms" enabled="true"/>
<service type="kml" enabled="true"/>
<service type="gmaps" enabled="true"/>
<service type="ve" enabled="true"/>
<service type="demo" enabled="true"/>
<errors>report</errors>
<lock_dir>/tmp</lock_dir>
</mapcache>
and osmbase.map file
#define PASTER(str) #str
#define STYLEPASTER2(stylename) PASTER(stylename##style.msinc)
#define LEVELPASTER2(stylename,index) PASTER(stylename##level##index.msinc)
#define STYLEPASTER(stylename) STYLEPASTER2(stylename)
#define LEVELPASTER(stylename,level) LEVELPASTER2(stylename,level)
## if you want unique layer names across zoom levels, use
## #define layername(name,suffix) xxstr(name)
## instead of the following macro
#define layername(name,suffix) xstr(name,suffix)
#define includefile(prefix,style) xstr(pri,suffix)
#define xstr(s,t) xxstr(s##t)
#define xxstr(s) #s
#include STYLEPASTER(THEME)
MAP
FONTSET "fonts.lst"
IMAGETYPE png
MAXSIZE 4000
SIZE 800 800
EXTENT OSM_EXTENT
UNITS OSM_UNITS
IMAGECOLOR _ocean_clr0
WEB
METADATA
"ows_enable_request" "*"
"wms_srs" "OSM_WMS_SRS"
"labelcache_map_edge_buffer" "-10"
"wms_title" "osm france"
END
END
DEBUG _debug
#if _debug > 0 || _layerdebug > 0
CONFIG "MS_ERRORFILE" "stderr"
#endif
CONFIG "PROJ_LIB" _proj_lib
PROJECTION
"init=epsg:OSM_SRID"
END
#include LEVELPASTER(THEME,0)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,1)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,2)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,3)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,4)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,5)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,6)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,7)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,8)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,9)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,10)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,11)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,12)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,13)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,14)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,15)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,16)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,17)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
#include LEVELPASTER(THEME,18)
#include "land.map"
#include "landusage.map"
#include "highways.map"
#include "buildings.map"
#include "borders.map"
#include "places.map"
SYMBOL
name "citycircle"
type ellipse
points 1 1 end
filled true
END
END
and Makefile is
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
SED=sed -i ""
CPP=cpp-4.2
else
SED=sed -i
CPP=cpp
endif
OSM_PREFIX=osm_new_
OSM_NAME_COLUMN=name
#OSM_SRID=3857
#OSM_UNITS=meters
#OSM_EXTENT=-20000000 -20000000 20000000 20000000
OSM_SRID=3857
OSM_UNITS=meters
OSM_DB_CONNECTION=host=localhost dbname=osm user=osm password=osm port=5432
OSM_EXTENT=-20000000 -20000000 20000000 20000000
OSM_WMS_SRS=EPSG:4326 EPSG:900913 EPSG:3857 EPSG:2154 EPSG:310642901
EPSG:4171 EPSG:310024802 EPSG:310915814 EPSG:310486805 EPSG:310702807
EPSG:310700806 EPSG:310547809 EPSG:310706808 EPSG:310642810 EPSG:310642801
EPSG:310642812 EPSG:310032811 EPSG:310642813 EPSG:2986
DEBUG=1
LAYERDEBUG=1
STYLE=google
#can also use google or bing
template=osmbase.map
includes=land.map landusage.map borders.map highways.map places.map \
generated/$(STYLE)style.msinc \
generated/$(STYLE)level0.msinc generated/$(STYLE)level1.msinc
generated/$(STYLE)level2.msinc generated/$(STYLE)level3.msinc \
generated/$(STYLE)level4.msinc generated/$(STYLE)level5.msinc
generated/$(STYLE)level6.msinc generated/$(STYLE)level7.msinc \
generated/$(STYLE)level8.msinc generated/$(STYLE)level9.msinc
generated/$(STYLE)level10.msinc generated/$(STYLE)level11.msinc \
generated/$(STYLE)level12.msinc generated/$(STYLE)level13.msinc
generated/$(STYLE)level14.msinc generated/$(STYLE)level15.msinc \
generated/$(STYLE)level16.msinc generated/$(STYLE)level17.msinc
generated/$(STYLE)level18.msinc
mapfile=osm-$(STYLE).map
here=`pwd`
all:$(mapfile) boundaries.sql
generated/$(STYLE)style.msinc: generate_style.py
python generate_style.py -s $(STYLE) -g > $@
generated/$(STYLE)level0.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 0 > $@
generated/$(STYLE)level1.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 1 > $@
generated/$(STYLE)level2.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 2 > $@
generated/$(STYLE)level3.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 3 > $@
generated/$(STYLE)level4.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 4 > $@
generated/$(STYLE)level5.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 5 > $@
generated/$(STYLE)level6.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 6 > $@
generated/$(STYLE)level7.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 7 > $@
generated/$(STYLE)level8.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 8 > $@
generated/$(STYLE)level9.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 9 > $@
generated/$(STYLE)level10.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 10 > $@
generated/$(STYLE)level11.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 11 > $@
generated/$(STYLE)level12.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 12 > $@
generated/$(STYLE)level13.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 13 > $@
generated/$(STYLE)level14.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 14 > $@
generated/$(STYLE)level15.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 15 > $@
generated/$(STYLE)level16.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 16 > $@
generated/$(STYLE)level17.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 17 > $@
generated/$(STYLE)level18.msinc: generate_style.py
python generate_style.py -s $(STYLE) -l 18 > $@
$(mapfile):$(template) $(includes)
$(CPP) -D_debug=$(DEBUG) -D_layerdebug=$(LAYERDEBUG)
-DOSM_PREFIX=$(OSM_PREFIX) -DOSM_SRID=$(OSM_SRID) -P -o $(mapfile)
$(template) -DTHEME=$(STYLE) -D_proj_lib=\"$(here)\" -Igenerated
$(SED) 's/##.*$$//g' $(mapfile)
$(SED) '/^ *$$/d' $(mapfile)
$(SED) -e 's/OSM_PREFIX_/$(OSM_PREFIX)/g' $(mapfile)
$(SED) -e 's/OSM_SRID/$(OSM_SRID)/g' $(mapfile)
$(SED) -e 's/OSM_UNITS/$(OSM_UNITS)/g' $(mapfile)
$(SED) -e 's/OSM_EXTENT/$(OSM_EXTENT)/g' $(mapfile)
$(SED) -e 's/OSM_WMS_SRS/$(OSM_WMS_SRS)/g' $(mapfile)
$(SED) -e 's/OSM_NAME_COLUMN/$(OSM_NAME_COLUMN)/g' $(mapfile)
$(SED) -e 's/OSM_DB_CONNECTION/$(OSM_DB_CONNECTION)/g' $(mapfile)
boundaries.sql: boundaries.sql.in
cp -f $< $@
$(SED) -e 's/OSM_PREFIX_/$(OSM_PREFIX)/g' $@
clean:
rm -f generated/*
data:
cd data; $(MAKE) $(MFLAGS)
And all this file is saved in /home/osm-demo/
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/EPSG-900913-Problem-tp5064677p5064881.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list