[mapserver-users] Can't draw points from shapefile
Michael McInnis
mmcinnis59 at msn.com
Sat Aug 3 08:59:51 PDT 2013
Thank you for your valuable response.
I've struggled through 25 layers in an existing .map file, some defined as index shape file coverages andnow I think I have them all properly configured. Most of the problems were deprecated syntax, bad pathsin index shape files or scale related omissions I've learned to overcome with mapserver Url parameters.
Thanks to all the helpful tips I've received on this challenge.
Michael McInnis
6033 44th Ave. N.E.
Seattle, WA 98115
206 517-4701
Date: Sat, 3 Aug 2013 09:23:55 -0600
From: bfraser at geoanalytic.com
To: mmcinnis59 at msn.com
CC: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Can't draw points from shapefile
Michael,
A minor point: Change UNITS DD in the map portion (UNITS,
EXTENT, and PROJECTION are all related).
But the basic problem is a lack of a SYMBOL object in the STYLE
object of the points layer. I didn't think it was necessary (it
wasn't in some previous versions?). Back in the day, I thought
the default was SYMBOL 0 which was defined as a filled circle
therefore no explicit definition or reference required in the map
file. It looks like this is no longer the case.
So the solution is to add a symbol definition to the map file
(between the WEB and LAYER objects):
#Circle symbol
SYMBOL
NAME 'CIRCLE'
TYPE ellipse
FILLED true
POINTS
1 1
END
END
and add a reference to it in the LAYER's STYLE object:
STYLE
SYMBOL 'CIRCLE'
COLOR 255 1 1
END
Best Regards,
Brent Fraser
On 8/1/2013 12:06 PM, Michael McInnis wrote:
I have not been able to draw basic points from a
shapefile. I can draw lines and polygons.
Does anyone see a problem with the hwypoints layer?
What is the minimal layer definition to display shapefile
points?
Thanks
PS - shapefile points draw in QGIS.
MAP
DEBUG 5
CONFIG "MS_ERRORFILE"
"/media/D_Drive/www/gis/logs/error_file.log"
EXTENT -180 -90 180 90
IMAGECOLOR 153 179 204
IMAGETYPE PNG24
SHAPEPATH data/
FONTSET data/fonts/fonts.list
UNITS MILES
SIZE 1000 1000 # Added
PROJECTION
#"+proj=mill +units=m"
"+proj=longlat +ellps=WGS84"
END
OUTPUTFORMAT
NAME png
DRIVER "AGG/PNG"
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
END
WEB
#IMAGEPATH "/home/www/gis/tmp/"
IMAGEPATH "/media/D_Drive/www/gis/tmp/"
IMAGEURL "gis/tmp/"
END
# good
LAYER
DATA "world_noUSA"
NAME "world"
TYPE POLYGON
STATUS ON
LABELITEM "NAME"
CLASS
STYLE
COLOR 217 223 195
OUTLINECOLOR 181 190 148
END
LABEL
FONT "arial"
PARTIALS false
#TYPE truetype
SIZE 8
MINFEATURESIZE 20
MINDISTANCE 1000
COLOR 123 130 140
END
END
PROJECTION
"+proj=longlat +ellps=WGS84"
END
END
# good
LAYER
DATA "hwypoints"
NAME "hwypoints"
TYPE POINT
STATUS ON
LABELITEM "HWYNUMBER"
CLASS
STYLE
#COLOR 255 1 1
#OUTLINECOLOR 181 190 148
END
LABEL
FONT "arial"
# PARTIALS false
# #TYPE truetype
SIZE 8
# MINFEATURESIZE 20
# MINDISTANCE 1000
COLOR 123 130 140
END
END
PROJECTION
"+proj=longlat +ellps=WGS84"
END
END
# good
LAYER
NAME "us_interstate"
DATA "US-Interstate-Low"
TYPE LINE
STATUS ON
CLASS
#MINSCALEDENOM 300000
STYLE
COLOR 190 87 99
SIZE 1
#SYMBOL "line"
ANTIALIAS TRUE
END
END
CLASS
#MINSCALEDENOM 30000
#MAXSCALEDENOM 300000
STYLE
COLOR 190 87 99
SIZE 2
#SYMBOL "line"
ANTIALIAS TRUE
END
END
CLASS
#MINSCALEDENOM 2000
#MAXSCALEDENOM 30000
STYLE
COLOR 150 47 59
SIZE 4
#SYMBOL "line"
ANTIALIAS TRUE
END
END
PROJECTION
"+proj=longlat +ellps=WGS84"
END
END
END
Michael McInnis
6033 44th Ave. N.E.
Seattle, WA 98115
206 517-4701
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130803/26f33097/attachment.htm>
More information about the MapServer-users
mailing list