please - please - can anybody shed any light on what I am doing wrong?

Joseph Norris sirronj at PACBELL.NET
Fri Nov 12 10:20:53 EST 2004


Stephen and group,

What I want to learn is just how to associate my data with a map using
mapserver.  My experience has been with ArcIMS but my inclination is more on
the open source route.  To learn how to do it with ArcIMS I started with the
most simplest model and went on from there.

Here is the scenario:

I have a Mysql database with a table of users categorized by working
conditions - 1st grade teachers, 2nd grade teachers etc...    in addition
there is other demographic information.  To begin with I would like to
extract the data to a dbf file and populate my map with symbols of the
location of these different types of teachers and their locations.  I know
that there ways to plug mapserver into Mysql via perl mapscript etc... but I
am not near that point yet.

Maybe my use of join was inappropriate in this context.  I am seeking a
simple model of my scenario so as to get into this - I don't want anybody to
write it for me because I am seeking the adventure of doing it myself.  I
have read through the mapfile documents but have not found a tutorial ( well
I found one - but it just discusses how to put a map up - which did not
easily reveal the need for class in layer ) that gives this type of
scenario.  I would write one if could get going on my scenario.

I hope this makes my needs a little clearer - and again to all Thank You!


#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: Stephen Woodbridge [mailto:woodbri at swoodbridge.com]
Sent: Thursday, November 11, 2004 6:11 PM
To: Joseph Norris; MapServer List
Subject: Re: [UMN_MAPSERVER-USERS] please - please - can anybody shed any
light on what I am doing wrong?

Joseph,

Can you explain more about what you want to achieve using a join? or why
you think you need to use a join?

Typically joins are only supported on QUERY with a template if you are
using shapefiles. If you are looking to use a join for say
classification of polygons for thematic mapping you should probably look
into moving all your data into PostGIS as it it not supported for
shapefiles (much to my consternation and occasional prodding otherwise).

-Steve

Joseph Norris wrote:

> Stephen,
>
> One more question.  Can you recommend a good how-to to begin learning how
to
> join tiger dbf data with tiger shape files?  Something very basic that I
can
> use as a start?  Thanks.
>
>
> #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 Stephen Woodbridge
> Sent: Thursday, November 11, 2004 1:48 PM
> To: MAPSERVER-USERS at lists.umn.edu
> Subject: Re: [UMN_MAPSERVER-USERS] please - please - can anybody shed any
> light on what I am doing wrong?
>
> AHh! I see a (the?) problem, you haven't declared a CLASS ... END block
> to tell mapserver HOW to reder you file. Try:
>
> LAYER
>    ...
>    CLASS
>      COLOR 0 0 0
>    END
> END
>
> -Steve
>
> Joseph Norris wrote:
>
>
>>Here is what I got from a shpdump:
>>
>>Shapefile Type: Polygon   # of Shapes: 58
>>
>>File Bounds: ( 5895561.577, -191512.795,0,0)
>>         to  ( 8945856.680, 3225756.404,0,0)
>>
>>
>>so I changed my extent to:
>>
>>EXTENT  5895561.577 -191512.795 8945856.680 3225756.404
>>
>>  IMAGETYPE PNG
>>  SIZE 600 600
>>  SHAPEPATH "data"
>>  IMAGECOLOR 255 255 255
>>
>>I  still get nothing in my browser.
>>
>>
>>#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 Ethan Alpert
>>Sent: Thursday, November 11, 2004 1:09 PM
>>To: MAPSERVER-USERS at lists.umn.edu
>>Subject: Re: [UMN_MAPSERVER-USERS] please - please - can anybody shed any
>>light on what I am doing wrong?
>>
>>Also do a shpdump and get the bounds in the projection of the shapefile.
>>
>>
>>-----Original Message-----
>>From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
>>Behalf Of Stephen Woodbridge
>>Sent: Thursday, November 11, 2004 1:08 PM
>>To: MAPSERVER-USERS at LISTS.UMN.EDU
>>Subject: Re: [UMN_MAPSERVER-USERS] please - please - can anybody shed
>>any light on what I am doing wrong?
>>
>>
>>Joseph,
>>
>>I'm not sure your extents are correct:
>>
>>EXTENTS xmin ymin xmax ymax
>>
>>it looks like you have xmin xmax ymin ymax. What to you get for an image
>>when you use shp2img utility?
>>
>>-Steve
>>
>>
>>Joseph Norris wrote:
>>
>>
>>
>>>I made a change - checked the permissions:
>>>
>>>Everything set to apache and with read/write/exec for apache
>>>
>>>This is the same as the
>>>
>>>http://mco.communityservers.com/cgi-bin/mapserv?map=/usr/local/apache/
>>>htdocs
>>>/mco.communityservers.com/htdocs/tests/test.map&mode=map
>>>
>>>
>>>
>>>This new url - simplified
>>>
>>>http://mco.communityservers.com/cgi-bin/mapserv?map=/usr/local/apache/
>>>htdocs
>>>/mco.communityservers.com/htdocs/maps/cal.map&mode=map
>>>
>>>The two directory permission structures are the exact same.
>>>
>>>
>>>
>>>#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 Stephen Woodbridge
>>>Sent: Thursday, November 11, 2004 11:54 AM
>>>To: MAPSERVER-USERS at lists.umn.edu
>>>Subject: Re: [UMN_MAPSERVER-USERS] please - please - can anybody shed
>>
>>any
>>
>>
>>>light on what I am doing wrong?
>>>
>>>When I hit the URL you listed it says:
>>>
>>>msLoadMap(): Unable to access file.
>>>(/usr/local/apache/htdocs/mco.communityservers.com/htdocs/maps/cal/cal
>>>.map)
>>>
>>>So I would check your path and your permissions
>>>
>>>-Steve
>>>
>>>Stephen Woodbridge wrote:
>>>
>>>
>>>
>>>
>>>>Joseph,
>>>>
>>>>You DATAPATH is relative to your mapfile unless you specify it as an
>>>>absolute path. I would start there. Also if you can load Netscape then
>>
>>
>>>>you can right click the broken image icon and select view image and it
>>
>>
>>>>will display any error messages that mapserver coughs up.
>>>>
>>>>-Steve
>>>>
>>>>Joseph Norris wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Group,
>>>>>
>>>>>Here I am again:
>>>>>
>>>>>I have this link:
>>>>>
>>>>>
>>>
>>>http://mco.communityservers.com/cgi-bin/mapserv?map=/usr/local/apache/
>>>htdocs
>>>
>>>
>>>
>>>>>/mco.communityservers.com/htdocs/maps/cal/cal.map&mode=map
>>>>>
>>>>>and this map file
>>>>>
>>>>>MAP
>>>>>NAME TESTMAP
>>>>>STATUS ON
>>>>>EXTENT  -1375383.89811082 -7278971.22201064 16216802.1381132
>>>>>10313214.8142134
>>>>>IMAGETYPE PNG
>>>>>SIZE 600 600
>>>>>SHAPEPATH "data"
>>>>>IMAGECOLOR 255 255 255
>>>>>
>>>>>WEB
>>>>>  METADATA
>>>>>    "key1" "value1"
>>>>>    "key2" "value2"
>>>>>    "key3" "value3"
>>>>>    "key4" "value4"
>>>>>  END
>>>>>END
>>>>>
>>>>>LAYER
>>>>>  NAME "calif_co_st"
>>>>>  TYPE POLYGON
>>>>>  DATA "calif_co_st"
>>>>>  STATUS DEFAULT
>>>>>END
>>>>>
>>>>>END
>>>>>
>>>>>I still getting nothing but this on my map ( right-click properties
>>>>>):
>>>>>
>>>>>The image
>>>>>
>>>
>>>"http://mco.communityservers.com/cgi-bin/mapserv?map=/usr/local/apache
>>>/htdoc
>>>
>>>
>>>
>>>>>s/mco.communityservers.com/htdocs/maps/cal/cal.map&mode=map" cannot
>>>>>be displayed, because it contains errors.
>>>>>
>>>>>And yet - when I move the tests directory into my http tree like this
>>>>>
>>>>>
>>>
>>>http://mco.communityservers.com/cgi-bin/mapserv?map=/usr/local/apache/
>>>htdocs
>>>
>>>
>>>
>>>>>/mco.communityservers.com/htdocs/tests/test.map&mode=map
>>>>>
>>>>>I get what the mapserver tests are supposed to give - is there
>>>>>something about my shape files I should know about?
>>>>>
>>>>>Please - anything at all would be helpful.
>>>>>
>>>>
>
>
>



More information about the mapserver-users mailing list