[mapserver-users] RE: Combine Layers of Different Unit Systems
Mike Boone
mike at boonedocks.net
Sat Jan 26 17:25:57 PST 2002
Thanks for the info. I'm still having trouble. I've given up on GDAL for
now, and like you said, reprojecting the raster part is overkill. So I have
MS 3.5 with PROJ.4 compiled in, and I have the following mapfile:
# Swamp Trip Map
NAME "SwampTrip"
EXTENT 530250.000000 3716850.000000 549000.000000 3735600.000000
UNITS METERS
SIZE 550 550
SHAPEPATH "/var/www/gis_data/"
PROJECTION
"proj=utm"
"datum=NAD27"
"zone=17"
END
LAYER
NAME "swamp"
DATA "o33080f5.tif"
TYPE RASTER
STATUS DEFAULT
PROJECTION
"proj=utm"
"datum=NAD27"
"zone=17"
END
END # end of layer object
LAYER
NAME spark
TYPE LINE
STATUS DEFAULT
DATA spark/spark
PROJECTION
"proj=latlong"
"datum=WGS84"
END
CLASS
COLOR 255 0 0
END # end of class object
END # end of layer object
END # end of map file
The raster file is a USGS TIFF image of the region. It is geotiff encoded.
The 'spark' shapefile was made by downloading a trackline into my Garmin 12
GPS, using Waypoint+ to extract it, and then wayp2shp program to make a
shapefile out of it. It is latitude/longitude data, using the WGS84 datum.
Running shp2img on this mapfile produces the following message:
msProjectRect(): some points failed to reproject, doing internal sampling.
The PNG image produced shows the raster file properly but the trackline is
nowhere to be seen. I run a similar mapfile in a web interface where I zoom
out and I never see the trackline.
Any ideas? Do my projection settings look correct?
In the meantime, I used Photoshop and manually fit my trackline. Here's what
I'm after in MapServer (minus the labels):
http://boonedocks.net/travel/scarolina/images/spark_2001_map_lg.jpg
Thanks for your help. MapServer is a very useful tool.
Mike Boone.
-----Original Message-----
From: Steve Lime [mailto:steve.lime at dnr.state.mn.us]
Sent: Tuesday, January 22, 2002 9:25 AM
Subject: Re: Combine Layers of Different Unit Systems
Hi Mike: You'll need to use the Proj.4 tool. It's more efficient to
reproject the GPS data than to screw around with projecting the raster
data. You don't need to add GDAL or anything else beyond Proj.4. You can
download it from http://www.remotesensing.org/proj.
That's the easiest way...
Steve
Stephen Lime
Data & Applications Manager
More information about the MapServer-users
mailing list