[mapserver-users] Valid extents for shape file, World Wind WMS Client

jonathanknez jonathanknez at hotmail.com
Wed Jun 25 06:05:04 PDT 2014


Steve,

*Your suggestions worked.* I am now able to use my MapServer to serve a
shapefile to my World Wind client. 

1. I changed the projection in my map file to 900913. 

Initially I got a new error that, "msProcessProjection(): no options found
in ‘init’ file". I checked my epsg file in /usr/share/proj/epsg. It did not
contain a definition for 900913. I found a definition online. I added it to
the end of my epsg file and it cleared up the error.
<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0
+y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs

2. Updated my wms_onlineresource field to replace that incorrect trailing ?
with a &.

Once those changes were made, it worked. 

I have one follow on question, *how did you know that epsg:900913 should be
used from looking at the shapefile?* Is there a dictionary somewhere that
says Google Mercator=900913?

Here is my corrected map file per Steve's direction. Thank you for the help.

============= houston.map ====================
MAP
	NAME houston
	STATUS ON
	SIZE 800 600
	EXTENT -10720217.000000 3306038.000000 -10419354.000000 3606902.000000
	UNITS METERS

	SHAPEPATH "shapefiles/houston"
	IMAGETYPE PNG24
	PROJECTION
		"init=epsg:900913"
	END
 
	WEB
		METADATA
			wms_title "Houston Title Web"
			wms_enable_request "*"
			wms_onlineresource
"http://10.0.0.141/cgi-bin/mapserver?map=/var/www/html/houston.map&"
			wms_srs "epsg:900913 epsg:4326"
		END
	END
 
	LAYER
		NAME "Houston_Border"
		DATA houston
		STATUS ON
		TYPE POLYGON
		CLASS
			STYLE
	        		COLOR 246 241 223
				OUTLINECOLOR 0 0 0
			END
    		END
		METADATA
			wms_title "Houston Title Layer"
			wms_extent "-10720217.000000 3306038.000000 -10419354.000000
3606902.000000"
		END
		PROJECTION
			"init=epsg:900913"
		END
	END
END



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Valid-extents-for-shape-file-World-Wind-WMS-Client-tp5147433p5147873.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list