Display of USGS Quads from a Service
From Geomoose
Contents |
Background
Display of USGS quads from a service can sometimes cause problems. I was not able to make this work simply by referencing the WMS within mapbook.xml. I used MapServer with a mapfile to reproject the data for me. I also had a small problem in that MapServer uses the C:/ms4w/proj/nad/epsg file and I had to reference it correctly. This is what I did to make it work in Polk County, Oregon. Occasionally I have had issues with display of USGS topo quads from this site. These issues appear to be on the host site as when I use their tools they are also very very very slow.
Mapbook.xml entries
- These are the the places I reference the usgs quad service.
<map-source name="usgs" type="mapserver" > <file>./usgs.map</file> <layer name="drg"/> <layer name="doq"/> </map-source>
<layer title="USGS Topography" src="usgs/drg" status="off" legend="false" fade="true" unfade="true"/>
Map File
- This is what my map file looks like.
MAP NAME 'USGS' STATUS ON TRANSPARENT TRUE IMAGETYPE JPEG SIZE 800 800 maxsize 100000 WEB IMAGEURL "c:/ms4w/tmp/ms_tmp" IMAGEPATH "c:/ms4w/tmp/ms_tmp" END PROJECTION # Oregon SP North 2913 "proj=lcc" "lat_1=46" "lat_2=44.33333333333334" "lat_0=43.66666666666666" "lon_0=-120.5" "x_0=2500000.0001424" "y_0=0" "ellps=GRS80" "to_meter=0.3048" "no_defs" END CONFIG "PROJ_LIB" "C:/ms4w/proj/nad/" OUTPUTFORMAT DRIVER GD/JPEG IMAGEMODE RGB FORMATOPTION "TRANSPARENT=FALSE" END OUTPUTFORMAT NAME 'print' DRIVER GD/JPEG IMAGEMODE RGB FORMATOPTION "TRANSPARENT=FALSE" END LAYER NAME drg TYPE RASTER STATUS ON CONNECTIONTYPE WMS CONNECTION "http://msrmaps.com/ogcmap.ashx?" OFFSITE 0 0 0 METADATA "wms_title" "IEM WMS Service" "wms_name" "DRG" "wms_server_version" "1.1.1" "wms_srs" "epsg:4326" "wms_format" "image/JPEG" "wms_connectiontimeout" "30" END END END
Project File
- This is what the line was for the projection in the C:/ms4w/proj/nad/epsg file.
# WGS 84 <4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs <>
Notes
I had to ensure that the proper projection file was referenced by the mapfile. This is not done by default within GeoMoose when you are using MapServer to reproject your service. So I had to make sure that the referenced projection "epsg:4326" was in my C:/ms4w/proj/nad/epsg. file