Things are comming along but .... please look at this mapfile dump

Joseph Norris sirronj at PACBELL.NET
Mon Nov 29 11:48:04 PST 2004


Thanks for responding David,

I follow you on most of this except for the following:

If all of your data is truly unprojected (lat/long), then all you
should need to do is change your extent to the appropriate boundaries
for your data in lat/long.


How do I find out what my extent should be for lat/long?

Here is my modified file - taking into account - I think - what you have
specified.

MAP
  EXTENT 5706290.827754 -192053.2 9127890.404246 3226086.749
  TEMPLATEPATTERN "map"
  IMAGECOLOR 255 255 255
  IMAGETYPE gif
  SHAPEPATH
"/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/teacher/tdata
"
  SIZE 600 600
  STATUS ON
  UNITS DD
  NAME "calmap"

  PROJECTION
          "proj=latlong"
  END

  OUTPUTFORMAT
    NAME gif
    MIMETYPE image/gif
    DRIVER GD/GIF
    EXTENSION gif
    IMAGEMODE PC256
    TRANSPARENT FALSE
  END

  SYMBOL
    NAME "circle"
    TYPE ELLIPSE
    FILLED TRUE
    POINTS
      1 1
    END
  END

  LEGEND
      IMAGECOLOR 255 255 255
    KEYSIZE 20 10
    KEYSPACING 5 5
    LABEL
      SIZE MEDIUM
      TYPE BITMAP
      BUFFER 0
      COLOR 0 0 0
      FORCE FALSE
      MINDISTANCE -1
      MINFEATURESIZE -1
      OFFSET 0 0
      PARTIALS TRUE
      POSITION CC
    END
    POSITION LL
    STATUS EMBED
  END

  QUERYMAP
      COLOR 255 255 0
    SIZE -1 -1
    STATUS OFF
    STYLE HILITE
  END

  SCALEBAR
      COLOR 0 0 0
    IMAGECOLOR 255 255 255
    INTERVALS 4
    LABEL
      SIZE MEDIUM
      TYPE BITMAP
      BUFFER 0
      COLOR 0 0 0
      FORCE FALSE
      MINDISTANCE -1
      MINFEATURESIZE -1
      OFFSET 0 0
      PARTIALS TRUE
    END
    POSITION LL
    SIZE 200 3
    STATUS OFF
    STYLE 0
    UNITS MILES
  END

  WEB
    IMAGEPATH ""
    IMAGEURL ""
    QUERYFORMAT text/html
  END

  LAYER
    CLASSITEM "zcta"
    DATA "cal_zp_st"
    NAME "calzip"
    SIZEUNITS PIXELS
    STATUS DEFAULT
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
    TYPE POLYGON
    UNITS DD
        PROJECTION
          "proj=latlong"
        END
    CLASS
      NAME "Zip Boundries"
      EXPRESSION /./
      STYLE
        MAXSIZE 100
        MINSIZE 1
          OUTLINECOLOR 204 204 204
        SIZE 1
        SYMBOL 0
      END

    END
   END

  LAYER
    NAME "points"
    SIZEUNITS PIXELS
    STATUS DEFAULT
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
    TYPE POINT
    UNITS DD
        PROJECTION
          "proj=latlong"
        END
    CLASS
      NAME "teacher"
      LABEL
        SIZE MEDIUM
        TYPE BITMAP
        BUFFER 2
        COLOR 255 102 102
        FORCE FALSE
        MINDISTANCE -1
        MINFEATURESIZE -1
        OFFSET 0 0
        PARTIALS FALSE
        POSITION AUTO
      END
      STYLE
          COLOR 255 102 102
        MAXSIZE 100
        MINSIZE 1
          OUTLINECOLOR 255 255 255
        SIZE 8
        SYMBOL "circle"
      END
    END
    FEATURE
      POINTS
        -121.507 38.5263
      END
      TEXT "Mary Lyn Kagan"
    END
    FEATURE
      POINTS
        -122.451 37.7752
      END
      TEXT "Greg D'Amico"
    END
    FEATURE
      POINTS
        -119.646 36.3426
      END
      TEXT "Leslie Steffen"
    END
    FEATURE
      POINTS
        -122.54 38.0065
      END
      TEXT "john antico"
    END
    FEATURE
      POINTS
        -116.976 32.7712
      END
      TEXT "SWANSONG BRAHMAN"
    END
  END
END

#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print @c=map chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu]On
Behalf Of David Fawcett
Sent: Monday, November 29, 2004 11:26 AM
To: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] Things are comming along but .... please
look at this mapfile dump

Joseph,

A few things that I noticed that are probably related to your problem:

It looks like your EXTENT is in meters suggesting a UTM projection.
Your UNITS specify DD, suggesting that your data is in Lat Long.

It also looks like you are creating your new points using Lat Long.

If all of your data is truly unprojected (lat/long), then all you
should need to do is change your extent to the appropriate boundaries
for your data in lat/long.

My guess is that you got your EXTENT from your Zip Code shapefile,
which suggests that it is projected to something like UTM.  If this is
the case, you will have to add a PROJECTION block for the map and
PROJECTION information for each layer in your map file.

David.

David J. Fawcett
MN Office of Environmental Assistance

>>> Joseph Norris <sirronj at PACBELL.NET> 11/29/2004 1:12:40 PM >>>
Hello again,

I am now on the quest to add points to my map of zips in California.  I
have
the following map file but the points are not showing up in the layer.
If
you can see anything that I need to change - please let me know.  I
have
found that it is easier to work from a dump of the mapfile - make
adjustments then return to my perl script and make sure that these
adjustments happen.

Thanks to all.


MAP
  EXTENT 5706290.827754 -192053.2 9127890.404246 3226086.749
  TEMPLATEPATTERN "map"
  IMAGECOLOR 255 255 255
  IMAGETYPE gif
  SHAPEPATH
"/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/teacher/tdata
"
  SIZE 600 600
  STATUS ON
  UNITS DD
  NAME "calmap"

  OUTPUTFORMAT
    NAME gif
    MIMETYPE image/gif
    DRIVER GD/GIF
    EXTENSION gif
    IMAGEMODE PC256
    TRANSPARENT FALSE
  END

  SYMBOL
    NAME "circle"
    TYPE ELLIPSE
    FILLED TRUE
    POINTS
      1 1
    END
  END

  SYMBOL
    NAME "plus"
    TYPE VECTOR
    POINTS
      0.5 0
      0.5 1
      -99 -99
      0 0.5
      1 0.5
    END
  END

  LEGEND
      IMAGECOLOR 255 255 255
    KEYSIZE 20 10
    KEYSPACING 5 5
    LABEL
      SIZE MEDIUM
      TYPE BITMAP
      BUFFER 0
      COLOR 0 0 0
      FORCE FALSE
      MINDISTANCE -1
      MINFEATURESIZE -1
      OFFSET 0 0
      PARTIALS TRUE
      POSITION CC
    END
    POSITION LL
    STATUS EMBED
  END

  QUERYMAP
      COLOR 255 255 0
    SIZE -1 -1
    STATUS OFF
    STYLE HILITE
  END

  SCALEBAR
      COLOR 0 0 0
    IMAGECOLOR 255 255 255
    INTERVALS 4
    LABEL
      SIZE MEDIUM
      TYPE BITMAP
      BUFFER 0
      COLOR 0 0 0
      FORCE FALSE
      MINDISTANCE -1
      MINFEATURESIZE -1
      OFFSET 0 0
      PARTIALS TRUE
    END
    POSITION LL
    SIZE 200 3
    STATUS OFF
    STYLE 0
    UNITS MILES
  END

  WEB
    IMAGEPATH ""
    IMAGEURL ""
    QUERYFORMAT text/html
  END

  LAYER
    NAME "points"
    SIZEUNITS PIXELS
    STATUS ON
    TEMPLATE "bogus.html"
    TOLERANCE 10
    TOLERANCEUNITS PIXELS
    TYPE POINT
    UNITS METERS
    CLASS
      NAME "buoy"
      LABEL
        SIZE MEDIUM
        TYPE BITMAP
        BUFFER 2
        COLOR 255 102 102
        FORCE FALSE
        MINDISTANCE -1
        MINFEATURESIZE -1
        OFFSET 0 0
        PARTIALS FALSE
        POSITION AUTO
      END
      STYLE
          COLOR 255 102 102
        MAXSIZE 100
        MINSIZE 1
          OUTLINECOLOR 255 255 255
        SIZE 8
        SYMBOL "circle"
      END
    END
    FEATURE
      POINTS
        -121.507 38.5263
      END
      TEXT "Mary Lyn Kagan"
    END
    FEATURE
      POINTS
        -122.451 37.7752
      END
      TEXT "Greg D'Amico"
    END
    FEATURE
      POINTS
        -119.646 36.3426
      END
      TEXT "Leslie Steffen"
    END
    FEATURE
      POINTS
        -122.54 38.0065
      END
      TEXT "john antico"
    END
    FEATURE
      POINTS
        -116.976 32.7712
      END
      TEXT "SWANSONG BRAHMAN"
    END
  END


  LAYER
    CLASSITEM "zcta"
    DATA "cal_zp_st"
    NAME "calzip"
    SIZEUNITS PIXELS
    STATUS DEFAULT
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
    TYPE POLYGON
    UNITS METERS
    CLASS
      NAME "Zip Boundries"
      EXPRESSION /./
      STYLE
        MAXSIZE 100
        MINSIZE 1
          OUTLINECOLOR 204 204 204
        SIZE 1
        SYMBOL 0
      END

    END
  END


END


#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print
@c=map chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);



More information about the MapServer-users mailing list