Hi Jonathan: Looking at the Houston zip file one sees the .prj file references
Google Mercator. So that's what you need to define for your layer. Here's the
new mapfile... You don't need to mention anything about geographic coordinates
here other than the fact you support requests in that srs.
The second message means you must have set the environment variable
MS_DEFAULT_MAPFILE_PATTERN in your web server configuration and that the
mapfile being passed as part of the incoming request doesn't pass that
validation check. The problem may be in your wms_onlineresource where you have
an extra trailing ? in the URL.
MAP
NAME houston
STATUS ON
SIZE 800 600
EXTENT -10720217.000000 3306038.000000 -10419354.000000 3606902.000000 # this
is OK
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
Steve
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of jonathanknez
Sent: Monday, June 23, 2014 6:02 PM
To: [email protected]
Subject: [mapserver-users] Valid extents for shape file, World Wind WMS Client
I am looking for help getting the Extents set correctly in my map file and
getting my World Wind WMS client working correctly with MapServer.
I have been using NASA's World Wind Java SDK for a while now and finally
decided to run my own map server to provide access to shape files.
I am brand new to map servers. I started with MapServer. It is up and running
on a CentOS virtual machine.
I downloaded a shape file for Houston TX from OpenStreetMap as a starting point
for my data set.
http://metro.teczno.com/#houston
I followed the examples as best I could to setup my "map" file for use with
MapServer. I used ogrinfo to get the extents of the Houston shape file:
"ogrinfo -al -so /path-to-shape-file/houston.shp". It returned:
Extent: (-10720217.000000, 3306038.000000) - (-10419354.000000,
3606902.000000)
This is clearly not decimal degrees. This must be meters right?
I put that Extent in my map file. When I point WorldWind (via the
WMSLayerManager example) to my WMS URL, it correctly gets the layer names
however when I select one to add to the display, it spits out an error,
"SEVERE: Angle out of range -1.04194E7°". Clearly it is trying to use the
Extent as a decimal degree.
*Any thoughts on how I fix this? I will include my map file and get
capabilities response at the end of this email.*
Now if I change my map file to use the extents, "-180 -90 180 90" (which is
clearly not correct but a good test), World Wind no longer complains about a
bad angle. Instead it provides error messages that must be from MapServer:
msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation
failed.
msEvalRegex(): Regular expression error. String failed expression test.
So my question is two fold:
1) How do I get the decimal degree extents that World Wind appears to be
expecting?
2) What does that msLoadMap error message mean and how do I correct it?
Thanks.
=================== 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:4326"
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: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:4326"
END
END
END
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Valid-extents-for-shape-file-World-Wind-WMS-Client-tp5147433.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users