mapserver join

John Spotten John.Spotten at CAPETOWN.GOV.ZA
Fri Jan 28 03:10:36 EST 2005


NOTE:  This e-mail (including attachments) is subject to the restrictions, qualifications
 and disclaimers (“disclaimer”) published at www.capetown.gov.za/disclaimer/email.pdf.
Please read the disclaimer before opening any attachment or taking any other action in
terms of this e-mail. If you cannot access the disclaimer, kindly send an email to
infomail at capetown.gov.za and a copy will be provided to you. By acting on this e-mail
or opening any attachment you agree to be bound by the provisions of the disclaimer.

-------------------------------------------------

Thanks Richard,

thanks for the help. your example explains everything.  nice to see help driven from the code/template side.

important points

JOIN under LAYER not CLASS.
JOIN TEMPLATE only required for multiple joins. contains [<joinname>] template.
for single joins replace LAYER template with join template.  contains [<joinname>_<fieldname>] template.

you can use map_<layername>_template=<templatename> as mapserver cgi parameter to replace templates, same goes for headers and footers.

also "%cgi parameter%" can be used in mapfile to replace templates and a lot more.  cgi parameter is replaced by it's value.

bye
john

John Spotten
Transport Modeller/GIS Developer
Directorate of Transport, Roads and Stormwater
City of Cape Town
Tel : +27 21 4067325
Fax : +27 21 4186989
Cell : +27 846678901
Email : john.spotten at capetown.gov.za
Web : www.capetown.gov.za


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Automatic digest processor
Sent: 28 January 2005 08:01 AM
To: Recipients of MAPSERVER-USERS digests
Subject: MAPSERVER-USERS Digest - 26 Jan 2005 to 27 Jan 2005 (#2005-27)


There are 43 messages totalling 3113 lines in this issue.

Topics of the day:

  1. cartography document by Peter Freimuth
  2. Mapserver in Suse distro
  3. installation problems [was Re: Example Maps] (2)
  4. Showing some text in a layer
  5. Zoom to custom extent - PHP (2)
  6. Licencing changes?
  7. Converting lat/long distance to miles. (3)
  8. Aggregate query (2)
  9. layers are not drawn (3)
 10. Displaying Text Objects
 11. Solution -- PHP Highlight list of Parcels Passed In - Solution
 12. PHP-Mapserver query result (3)
 13. Debug Logging (3)
 14. Example Maps (2)
 15. MapInfo and MapServer point location problem (3)
 16. Zoom to custom extent - PHP - SOLVED
 17. <No subject given>
 18. shifting .gif colors (2)
 19. Problem with Mapscript + PostGIS (3)
 20. XUL Interface for mapserver app?
 21. MySWL bot on the loose
 22. Transparent pixmaps in Mapserver 4.4.1 (4)
 23. mapfile join

----------------------------------------------------------------------

Date:    Thu, 27 Jan 2005 09:00:19 +0100
From:    "Arnulf Christl (CCGIS)" <arnulf.christl at CCGIS.DE>
Subject: Re: cartography document by Peter Freimuth

> Hi There,
>
>   I had a like to a cartography document written by Peter Freimuth but
> the link is no more valid. Is this document available somewhere else for
> consultation ?
>
> Thanks
>
>   original link was :
>   http://www.mapbender.org/umn_cartography/cartographic_symbols.html
> --
> ----------------------------------------------------------------
> Assefa Yewondwossen

Hi,
I removed the document from this link because I didn't want it to be
forked.  Jeff McKenna has the current version and wanted to docbook it. He
will know.

Best, Arnulf.

------------------------------

Date:    Thu, 27 Jan 2005 09:12:40 +0100
From:    Umberto Nicoletti <unicoletti at PROMETEO.IT>
Subject: Re: Mapserver in Suse distro

I am running java mapscript on suse 9.1 pro with suse provided rpm for
anything except gdal.

Regards,
Umberto

On Wed, 2005-01-26 at 16:05 -0600, Carlos Eduardo Sibaja Salazar wrote:
> Hi list.
> I need to know if somebody has mapserver installed in linux with a suse distro. I need to know the version of the most important programs and libraries used, mapserver, apache, gdal, etc. Thanks
>
> _______________________________________
> Yo me registré en www.costarricense.cr
--
Umberto Nicoletti <unicoletti at prometeo.it>
Prometeo SRL

------------------------------

Date:    Tue, 25 Jan 2005 09:21:51 -0500
From:    Julien-Samuel Lacroix <jlacroix at DMSOLUTIONS.CA>
Subject: Re: installation problems [was Re: Example Maps]

Hi,

Check the installation instruction for your OS:
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScript

Normally adding --enable-force-cgi-redirect to your configure command
should do the job.

Thanks
Julien

Nicole Faust wrote:
> Hello,
>
> I made a little mistake, sorry.
>
>
>>I think there's something wrong with the PHP/Mapscript installation or
>>configuration. But I don't know what. I followed the installation steps on
>>the site http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI
>>section "Running only PHPMapScript scripts as a CGI".
>
>
> The section I meant was the following:
> "So how do I reconfigure my PHP as a CGI?"
>
>
> Regards,
>    Nicole
>

--
------------------------------------------------------------
Julien-Samuel Lacroix            jlacroix at dmsolutions.ca
DM Solutions Group               http://www.dmsolutions.ca/
------------------------------------------------------------

------------------------------

Date:    Tue, 25 Jan 2005 09:18:01 -0500
From:    Julien-Samuel Lacroix <jlacroix at DMSOLUTIONS.CA>
Subject: Re: Showing some text in a layer

Hi,

I'm far from a PostGIS expert, but I notice 2 problems in your layer.
1. Your layer type is LINE, but in your table you seem to have a POINT
layer. Am I right? So if you want to show points you should use
TYPE POINT
or if you only want to show the labels, you should use:
TYPE ANNOTATION

2. You don't have any style in your class. For LINE and POINT types, you
should have a STYLE in your class.

Thanks
Julien

Aaron Craig wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> In my mapfile, I've defined a layer:
>
> LAYER
>        TYPE LINE
>        STATUS DEFAULT
>        NAME "museum_label"
>
>        CONNECTION 'user=postgres dbname=postgis_sardegna'
>        CONNECTIONTYPE POSTGIS
>        DATA 'point_geom from museum'
>
>        LABELITEM "name"
>        CLASS
> ~               LABEL
> ~                       COLOR 0 0 0
> ~                       TYPE TRUETYPE
> ~                       FONT arial
> ~                       SIZE 10
> ~                       ANTIALIAS TRUE
> ~                       POSITION CC
> ~                       PARTIALS FALSE
> ~                       MINDISTANCE 10
> ~                       BUFFER 1
>                END # end of label
>        END
> END
>
> The museum table looks like:
> postgis_sardegna=# \d museum
> ~              Table "public.museum"
> ~   Column   |          Type          | Modifiers
> - ------------+------------------------+-----------
> ~ id         | integer                |
> ~ name       | character varying(255) |
> ~ xdb_id     | integer                |
> ~ point_geom | geometry               |
> Check constraints:
> ~    "enforce_srid_point_geom" CHECK (srid(point_geom) = -1)
> ~    "enforce_geotype_point_geom" CHECK (geometrytype(point_geom) =
> 'POINT'::text OR point_geom IS NULL)
>
> But the layer does not display.  In the mapfile, it is the last layer to
> be declared, so it should be rendered last (on top), correct?
>
> Another layer that shows labels does work.  The syntax for the layer is
> the same, leading me to believe that my mapfile syntax is ok.  The
> working layer's underlying table's geometry column is MULTIPOLYGON
> instead of POINT.  Could that be the problem?
>
> Thanks.
>
> - --
> Aaron Craig
> mercutio at pobox.com
>
> ===========================================================
> Get Firefox!
> http://www.spreadfirefox.com/?q=affiliates&amp;id=0&amp;t=1
> ===========================================================
>
>
> - -=-=-
> I am but mad north-northwest: when the wind is southerly I know a hawk
> from a handsaw. --Hamlet, II:2
> - -=-=-
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFB9iS7oyEQRcU83p4RAjIaAKCHW/NKMTrRueEz3NGBBBxSTqqX/ACcCGYi
> z4jh9xXhwvQyLvbPB4AC2gQ=
> =DhU0
> -----END PGP SIGNATURE-----
>

--
------------------------------------------------------------
Julien-Samuel Lacroix            jlacroix at dmsolutions.ca
DM Solutions Group               http://www.dmsolutions.ca/
------------------------------------------------------------

------------------------------

Date:    Thu, 27 Jan 2005 06:38:25 -0500
From:    William Bronsema <wbronsema at DMSOLUTIONS.CA>
Subject: Re: Zoom to custom extent - PHP

Kevin,

PHP variables are case sensitive.  I just took a quick peek at the code you
sent me earlier.  Your app uses $http_form_vars not $HTTP_FORM_VARS.

Try changing to $http_form_vars and let me know how it goes.

Regards,
Bill


________________________________________________
William A. Bronsema, C.E.T.
Applications and Software Development,
DM Solutions Group Inc.




> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] On
> Behalf Of Kevin Grootendorst
> Sent: January 26, 2005 3:42 PM
> To: MAPSERVER-USERS at lists.umn.edu
> Subject: Re: [UMN_MAPSERVER-USERS] Zoom to custom extent - PHP
>
> Bill,
> I added that code, right before the IF statement.
> There was no output...
> Does that tell us that ($HTTP_FORM_VARS) is null?
> ?
>
>
> On Wed, 26 Jan 2005 15:20:01 -0500, William Bronsema
> <wbronsema at DMSOLUTIONS.CA> wrote:
>
> >Kevin,
> >
> >It sounds like $HTTP_FORM_VARS['doQuickZoom'] is not being set.
> >
> >Add this:
> >echo '<pre>';
> >print_r( $HTTP_FORM_VARS );
> >echo '</pre>';
> >
> >just before the if statement and send me the output for both an intial
> page
> >load and quickzoom page load.  This will tell us exactly what is being
> set
> >(or not set ;) ).
> >
> >Regards,
> >Bill
> >
> >
> >
> >________________________________________________
> >William A. Bronsema, C.E.T.
> >Applications and Software Development,
> >DM Solutions Group Inc.
> >
> >
> >
> >> -----Original Message-----
> >> From: Kevin Grootendorst [mailto:kgrootendorst at BAIRD.COM]
> >> Sent: January 26, 2005 3:12 PM
> >> To: MAPSERVER-USERS at LISTS.UMN.EDU; William Bronsema
> >> Subject: Re: Zoom to custom extent - PHP
> >>
> >> Bill,
> >> OK.  This makes sense.
> >>
> >> But, using the following statement:
> >> If ( isset( $HTTP_FORM_VARS['doQuickZoom']) && $HTTP_FORM_VARS
> >> ['doQuickZoom'] == "1" )
> >> This returns a false, and the QuickZoom php code is not executed.
> >>
> >> Using this statement:
> >> If ( isset( $HTTP_FORM_VARS['doQuickZoom']) && $HTTP_FORM_VARS
> >> ['doQuickZoom'] == "" )
> >> Also returns a false.
> >>
> >> Using this statement:
> >> If ($HTTP_FORM_VARS['doQuickZoom'] == "")
> >> Returns a TRUE - and the php code is executed.  But the map does not
> draw
> >> to the desired extents.  It just refreshes the current map extent.
> >>
> >> Thanks.
> >>
> >> Kevin
> >>
> >>
> >> On Wed, 26 Jan 2005 14:52:35 -0500, William Bronsema
> >> <wbronsema at DMSOLUTIONS.CA> wrote:
> >>
> >> >Kevin,
> >> >
> >> >doQuickZoom is supposed to go back to "".  echo
> >> >$HTTP_FORM_VARS['doQuickZoom'] before your "If ( isset(
> >> >$HTTP_FORM_VARS['doQuickZoom'])...." statement to see what I mean.  It
> >> >should only echo 1 after a quick zoom is called.  You only want it to
> be
> >> 1
> >> >when you want to do a quick zoom.  Make sense?
> >> >
> >> >Is the PHP code being called to perform the quick zoom and the map is
> >> just
> >> >not zooming?  Or is the PHP code not being called?
> >> >
> >> >Regards,
> >> >Bill
> >> >
> >> >________________________________________________
> >> >William A. Bronsema, C.E.T.
> >> >Applications and Software Development,
> >> >DM Solutions Group Inc.
> >> >

------------------------------

Date:    Thu, 27 Jan 2005 06:31:16 -0600
From:    Eduin Carrillo <yecarrillo at YAHOO.COM>
Subject: Licencing changes?

I'm curious. A Geomatic Investigation Group from Colombia has announced that
mapserver will cost 1500 dollars after January 12. I'm really surprised with
this "news". This is a joke!

Take a look:

"Mapserver no es gratis - A partir de enero 12, MapServer cuesta 1500 dólares."

http://albatros.uis.edu.co/~pagina/grupos/geomatica/inicio.php?p=experiencia.htm

What world they live?

Plop!




=====
Eduin Yesid Carrillo Vega
yecarrillo at yahoo.com
COLOMBIA

_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

------------------------------

Date:    Thu, 27 Jan 2005 08:23:02 -0500
From:    Lowell Filak <lfilak at MEDINACO.ORG>
Subject: Re: Converting lat/long distance to miles.

The following message was sent by Camden Daily <cdaily at GMAIL.COM> on
Wed, 26 Jan 2005 16:15:38 -0600.

> Ok.  I had axed all my projection blocks because I'd converted all my
> shapefiles to lat/long (epsg:4326) using ogr2ogr, so I figured I
> didn't need them.  Should I still add a projection block to the map
> and each layer?
>
> My map file has a 'units' set to dd, since that is how I set my
> extents (and I need to set them that way, since I'm centering off a
> given lat/long point in mapscript).
>
> Could I set the extents in mapscript using dd, and then change the
> units to miles for my distance calculations?

Camden,

I don't think it is possible to just change the units to miles for a DD
projection, but I've never tried that.? However, being that all your
layers and map are epsg:4326, temporarily assigning another epsg code to
the map and units to miles with each layer staying epsg:4326 shouldn't
be to difficult.

Lowell

------------------------------

Date:    Thu, 27 Jan 2005 13:47:51 -0000
From:    Benjamin Lloyd-Hughes <blh at MSSL.UCL.AC.UK>
Subject: Aggregate query

Hi

I'm using the cgi mapserver in NQUERY mode to extract values within a user
defined extent from a point shape file.  The query works fine in so much
that it returns the desired data and dumps this into the specifed template.
So far so good... But what I really want to obtain is the average of these
values.  I've been scratching my head and thought I might be able to do
something using the EVAL() javascript function but I've not had any joy.  I
would be very grateful I someone could point me in the direction of a
solution.

I'm a bit of a newbie so please be gentle - it just feels like this must be
the sort of problem people encounter all the time.

Cheers,

Ben

------------------------------

Date:    Thu, 27 Jan 2005 07:50:50 -0600
From:    Alex Chimarios <alhim at INTRACOM.GR>
Subject: layers are not drawn

Hi,

I am trying to port mapscript to arm-linux for iPAQ PDA in order to create a
demo application loading just one map.

I have cross-compiled for arm-linux the following libraries :
proj-4.4.7
gdal-1-1-9
freetype2
gd-2.0.25 with png, jpeg and freetype support

I have used libpng ,lipjpeg, libX11 and libxpm from binaries coming with
Familiar Linux distro for PDA.

Finally I cross-compiled mapserver and mapscript.

However, when I try to run a simple program in mapscript, the map is drwan
without any layers on it!!! Just the background .

Can you give me a tip ? I think it may be a lib error. Which lib is
responsible if layers are not drawn ?


p.s : this is my map file :

MAP

NAME Mediteranean

STATUS ON
SIZE 600 600
EXTENT 2.5256 21.5595 34.1734 53.2078



SHAPEPATH "/root/gistest"


IMAGECOLOR 50 200 200
IMAGETYPE PNG
INTERLACE ON



PROJECTION
"init=epsg:4326"
END
 WEB
        IMAGEPATH "/root/"
        IMAGEURL "/root/"
    END




LAYER

NAME "cities"

STATUS ON
DATA cities
TYPE POINT
PROJECTION
"init=epsg:4326"
END

LABELITEM "NAME"

        CLASS


                STYLE
                        COLOR 255 255 0

                        SYMBOL "/root/gistest/ctyhwy.png"
                END

        LABEL
                COLOR 255 255 0
                SIZE tiny
                #FONT arial
                POSITION CL
                PARTIALS TRUE
                ANTIALIAS TRUE
                MINDISTANCE 30
                BUFFER 1
        END
        END
END

------------------------------

Date:    Thu, 27 Jan 2005 05:43:22 -0800
From:    neelima <neelima91 at YAHOO.CO.IN>
Subject: Displaying Text Objects

--0-2091289851-1106833402=:65855
Content-Type: text/plain; charset=us-ascii

Helo,
I am doing my thesis, in which i have created a tool that can dynamically create a mapfile for mapinfo professional.
Now my problem is,  i am not able to display text object in the browser , all the text poperties are perfectly extracted to the map file but they are not being displayed in the browser. So, just wanted to know if there is any possiblity to display text object in the browser.
Thanking you,
Neelima



---------------------------------
Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.
--0-2091289851-1106833402=:65855
Content-Type: text/html; charset=us-ascii

<DIV>
<DIV>Helo, </DIV>
<DIV>I am doing my thesis, in which i have created a tool&nbsp;that can dynamically create a mapfile for mapinfo professional.</DIV>
<DIV>Now my problem is, &nbsp;i am not able to display&nbsp;text object in the browser , all the text poperties are perfectly extracted to the map file but they are not&nbsp;being displayed in the browser. So,&nbsp;just wanted to know if there is any possiblity to display text object in the browser. </DIV>
<DIV>Thanking you,</DIV>
<DIV>Neelima</DIV></DIV><p>
                <hr size=1>Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/mail_us/taglines/security/*http://promotions.yahoo.com/new_mail/static/protection.html">Yahoo! Mail</a> - You care about security. So do we.
--0-2091289851-1106833402=:65855--

------------------------------

Date:    Thu, 27 Jan 2005 09:00:05 -0500
From:    Steve Lehr <lehrs at ERAU.EDU>
Subject: Re: Solution -- PHP Highlight list of Parcels Passed In - Solution

This is a multi-part message in MIME format.

------=_NextPart_000_002B_01C5044E.97F4A500
Content-Type: text/plain;
        charset="us-ascii"
Content-Transfer-Encoding: 7bit

Abe:

Thanks again for the help.  I ended up getting the highligting to work --
with your suggestions, though I thought I would be smart and change the
QUERYMAP style to selected - not so smart, after reading the STYLE options
for QUERYMAP it highlighted the found parcels just as it did not found
parcels as defined in the layer definition... so for quite awhile I did not
see that I had found the 2 shapes it has said it found (the selected sytle
option defaults to layer queried definition - and thus it just rendered the
green line as it did for the other parcels not found in the query, but as
found in the layer itself).  Anyway, changed that back to hilight as you
said and it worked fine.

I searched the emails pretty hard to find a way to render the highlighted
shapes a little better, Ken from DNR was the only post I could find.

Then I thought about it some more and derived a much simpiler solution ...
set up a new layer, create a class with an expression, then send in the
expression variable or set the expression in PHP however you choose to
operate (i.e. cgi or scripting).  i.e.

CLASSITEM ID
CLASS
  EXPRESSION /%list%/     #NOTE var set in via CGI would be list -->
....&list=1|2|3&..

or
$new_expression = "/".$list."/";
$class->setexpression($new_expression);

No querymap needed and much better control of layer formatting.
Additionally, I can continue to pass the variable $list around (containing
list of parcels) and then let the user browse my map with the list of
parcels highlighted and peek and poke at other data.  And of course add to
the list or cull from the list.

Thanks again for the help of this tremendous list!

Steven Lehr
Assistant Professor
Freshmen Program
College of Engineering
Embry-Riddle Aeronautical University (LB159)
600 S. Clyde Morris Blvd.
Daytona Beach, FL 32114-3900
386-226-7740
  -----Original Message-----
  From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Abe Gillespie
  Sent: Sunday, January 23, 2005 2:39 AM
  To: MAPSERVER-USERS at LISTS.UMN.EDU
  Subject: Re: [UMN_MAPSERVER-USERS] PHP Highlight list of Parcels Passed In


  Um ... yeah, it's late and I'm tired. Please replace "ampersand" with "at
symbol" at the appropriate place. :)

  -Abe

  On Jan 23, 2005, at 1:44 AM, Abe Gillespie wrote:


    Ok, since this list has been so helpful and generous to me in the past,
here is an exhaustive example. I hope this will finally get you going.
Disclaimer: I'm doing this all from memory and w/o testing so there may be a
few errors.

    Setup a map file like this:

    MAP
    NAME "Parcel Query"
    STATUS on
    EXTENT xmin ymin xmax ymax
    SIZE 300 300
    SHAPEPATH "/data_path"
    IMAGETYPE png
    IMAGECOLOR 255 255 255


    QUERYMAP
    STYLE hilite
    COLOR 255 0 0
    END


    LAYER
    NAME "Parcels"
    DATA "parcels"
    CLASS
    OUTLINECOLOR 0 255 0
    END
    TEMPLATE "x"
    END
    END

    Setup a web page like this:

    <html>
    <head>
    <?
    $parcel_ids = "1|2|3|4|5";

    if (PHP_OS == "WINNT" || PHP_OS == "WIN32")
    dl("php_mapscript.dll");
    else
    dl("php_mapscript.so");

    $map = ms_newMapObj("parcels.map");
    $layer = $map->getLayerByName("parcels");

    // Query.
    $layer->queryByAttributes("", "/".$parcel_ids."/", MS_MULTIPLE);
    // If you want to avoid errors when no matches are found use the
ampersand
    // in the above statement like this: @$layer->queryByAttributes();

    // Render an image and get its URL.
    $img = $map->drawQuery();
    $url = $img->saveWebImage(MS_PNG, 1, 1, 0);
    $img->free();
    ?>
    </head>
    <body>
    <img src="<? echo $url; ?>" />
    <?
    if ($layer->getNumResults() > 0)
    echo $layer->getNumResults()." parcels found.";
    else
    echo "No parcels found.";
    ?>
    </body>
    </html>

    Now that I look at it, the last thing you may have been missing was the
mapObj::queryMap() method. Anyhow, I hope this helps.

    -Abe

    On Jan 22, 2005, at 10:07 PM, Steve Lehr wrote:


      Abe:

      I appreciate the help, still not getting it though. I'm wondering if I
need
      to draw out the map after rendering? I've sceen other posts but no
real
      solutions...

      I'll start from scratch rather then trying to reuse something I have.
If
      anyone else has a more complete example I'd really appreciate seeing
it.

      Thanks

      Steven Lehr
      Assistant Professor
      Freshmen Program
      College of Engineering
      Embry-Riddle Aeronautical University (LB159)
      600 S. Clyde Morris Blvd.
      Daytona Beach, FL 32114-3900
      386-226-7740

      -----Original Message-----
      From: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
      Behalf Of Abe Gillespie
      Sent: Saturday, January 22, 2005 8:22 PM
      To: MAPSERVER-USERS at LISTS.UMN.EDU
      Subject: Re: [UMN_MAPSERVER-USERS] PHP Highlight list of Parcels
Passed
      In


      Something else I noticed. You shouldn't even have to setup a separate
      layer to show queried parcels (though there are ways to do this). I
      suggest starting out with one layer that renders queried and
      non-queried parcels at the same time. Once you get the hang of that
      then you can do two different layers (if you still even want to). Make
      the layer like this:

      LAYER
      NAME "parcels"
      DATA "parcels"
      STATUS on
      TYPE polygon
      CLASS
      OUTLINECOLOR 0 255 0
      END
      TEMPLATE "x" # Must be present to query on (though "x" means
      absolutely nothing).
      END

      The above layer will render all your parcels green outline with hollow
      fill. Then when you use the PHP code to query it will render your
      queried parcels red. This assumes you have QUERYMAP setup correctly.

      -Abe

      On Jan 22, 2005, at 7:12 PM, Steve Lehr wrote:


        Abe I've never used the QUERY MAP before, I tried putting it in the
        layer
        and it did not like that?

        My initial layer looks like:

        I changed my code to pass Pipe delimited.

        But I'm not quite certian I'm still getting what I need to do to my
        .map.

        Thanks for the help..below is the layer repeated my EXPRESSION is
        trashed I
        realize.


          LAYER
          NAME "selected_parcels"
          DATA parcels
          STATUS DEFAULT
          TYPE POLYGON
          CLASSITEM QPID
          CLASS
          EXPRESSION "/%parcels%/"
          COLOR 255 0 0
          END
          END



        Steven Lehr
        Assistant Professor
        Freshmen Program
        College of Engineering
        Embry-Riddle Aeronautical University (LB159)
        600 S. Clyde Morris Blvd.
        Daytona Beach, FL 32114-3900
        386-226-7740

        -----Original Message-----
        From: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
        Behalf Of Abe Gillespie
        Sent: Saturday, January 22, 2005 7:05 PM
        To: MAPSERVER-USERS at LISTS.UMN.EDU
        Subject: Re: [UMN_MAPSERVER-USERS] PHP Highlight list of Parcels
Passed
        In


        For the red you need to setup the QUERYMAP. For the PHP it will be
        something like this:

        $target =
use_appropriate_string_func_to_conver_semi_to_pipe($parcels);
        // $target should look like "1|2|3|4" ... where the numbers are the
        IDs.
        $layer = $map->getLayerByName("parcels");
        $layer->queryByAttributes("parcel_id_field", "/".$target."/",
        MS_MULTIPLE);

        Also, don't forget to add the TEMPLATE "x" tag in your LAYER
        definition.

        I'm not a RegEx expert, so someone please put me in check if I'm
        leading Steven astray.

        -Abe

        On Jan 22, 2005, at 6:37 PM, Steve Lehr wrote:


          I'm trying to write some PHP that I can send extents and list of
          parcels to
          get it to highlight the parcels.

          I'd like to highlight all the found parcels in RED.

          My php gets a variable by post called parcels and contains at this
          time a
          semi colon delimited list of ids in the attribute column QPID of
the
          parcels.dbf.

          LAYER
          NAME "selected_parcels"
          DATA parcels
          STATUS DEFAULT
          TYPE POLYGON
          CLASSITEM QPID
          CLASS
          EXPRESSION "/%parcels%/"
          COLOR 255 0 0
          END
          END


          I've got my extents. I've got the list of parcels. Now I want to
          highlight
          the list of parcels with something like the below. But I have to
do
          something in php to take that ; delimited list and the turn on all
the
          matching attributes. (I belive its a QUERYMAP with
MULTIPLE_SELECT)
          but I'm
          having trouble getting my brain around what I need to code - might
          someone
          have a sample.

          Thanks

          Steven Lehr
          Assistant Professor
          Freshmen Program
          College of Engineering
          Embry-Riddle Aeronautical University (LB159)
          600 S. Clyde Morris Blvd.
          Daytona Beach, FL 32114-3900
          386-226-7740






------=_NextPart_000_002B_01C5044E.97F4A500
Content-Type: text/html;
        charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2>Abe:</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =
size=3D2>Thanks=20
again for the help.&nbsp; I ended up getting the highligting to work -- =
with=20
your suggestions, though I thought I would be smart and change the =
QUERYMAP=20
style to selected -&nbsp;not so smart, after reading the STYLE options =
for=20
QUERYMAP it highlighted the found parcels&nbsp;just as it did =
not&nbsp;found=20
parcels as defined in the layer definition...&nbsp;so for quite awhile I =
did not=20
see that I had found the 2 shapes it has said it found (the selected =
sytle=20
option defaults to layer queried definition - and thus it just rendered =
the=20
green line as it did for the other parcels not found in the query, but =
as found=20
in the layer itself).&nbsp; Anyway, changed that back to hilight as you =
said and=20
it worked fine.</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =
size=3D2>I=20
searched the emails pretty hard to find a way to render the highlighted =
shapes a=20
little better,&nbsp;Ken from DNR was the only post I could=20
find.</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =
size=3D2>Then I=20
thought about it some more and&nbsp;derived a much&nbsp;simpiler =
solution ...=20
set up a new layer, create a class with an expression, then send in the=20
expression variable or set the expression in PHP however you choose to =
operate=20
(i.e. cgi or scripting).&nbsp; i.e.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2>CLASSITEM ID</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2>CLASS</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =
size=3D2>&nbsp;=20
EXPRESSION /%list%/&nbsp;&nbsp;&nbsp;&nbsp; #NOTE var set in via =
CGI&nbsp;would=20
be list --&gt; &nbsp;...&amp;list=3D1|2|3&amp;..</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2>or</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2>$new_expression =3D "/".$list."/";</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2>$class-&gt;setexpression($new_expression);</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005></SPAN><SPAN =
class=3D343304313-27012005><FONT=20
face=3DArial color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =
size=3D2>No=20
querymap needed and much&nbsp;better control of layer formatting.&nbsp;=20
Additionally, I can continue to pass the variable $list around =
(containing list=20
of parcels) and then let the user browse my map with the list of parcels =

highlighted and peek and poke at other data.&nbsp; And of course add to =
the list=20
or cull from the list.</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =
size=3D2>Thanks=20
again for the help of this tremendous list!</FONT></SPAN></DIV>
<DIV><SPAN class=3D343304313-27012005><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><FONT size=3D2><SPAN class=3D343304313-27012005>S</SPAN>teven =
Lehr<BR>Assistant=20
Professor<BR>Freshmen Program<BR>College of Engineering<BR>Embry-Riddle=20
Aeronautical University (LB159)<BR>600 S. Clyde Morris Blvd.<BR>Daytona =
Beach,=20
FL 32114-3900<BR>386-226-7740</FONT> </DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> UMN MapServer =
Users List=20
  [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]<B>On Behalf Of </B>Abe=20
  Gillespie<BR><B>Sent:</B> Sunday, January 23, 2005 2:39 =
AM<BR><B>To:</B>=20
  MAPSERVER-USERS at LISTS.UMN.EDU<BR><B>Subject:</B> Re: =
[UMN_MAPSERVER-USERS] PHP=20
  Highlight list of Parcels Passed In<BR><BR></FONT></DIV>Um ... yeah, =
it's late=20
  and I'm tired. Please replace "ampersand" with "at symbol" at the =
appropriate=20
  place. :)<BR><BR>-Abe<BR><BR>On Jan 23, 2005, at 1:44 AM, Abe =
Gillespie=20
  wrote:<BR><BR>
  <BLOCKQUOTE><?smaller>Ok, since this list has been so helpful and =
generous=20
    to me in the past, here is an exhaustive example. I hope this will =
finally=20
    get you going. Disclaimer: I'm doing this all from memory and w/o =
testing so=20
    there may be a few errors.<BR><BR>Setup a map file like =
this:<BR><BR>MAP<BR><?/smaller><TT><?x-tad-bigger>NAME "Parcel=20
    Query"<BR>STATUS on<BR>EXTENT xmin ymin xmax ymax<BR>SIZE 300=20
    300<BR>SHAPEPATH "/data_path"<BR>IMAGETYPE png<BR>IMAGECOLOR 255 255 =
255<?/x-tad-bigger></TT></BLOCKQUOTE>
  =
<BLOCKQUOTE><?smaller><BR><BR><?/smaller><TT><?x-tad-bigger>QUERYMAP<BR>S=
TYLE=20
    hilite<BR>COLOR 255 0 0<BR>END<?/x-tad-bigger></TT></BLOCKQUOTE>
  <BLOCKQUOTE><?smaller><BR><BR>LAYER<BR>NAME "Parcels"<BR>DATA=20
    "parcels"<BR>CLASS<BR>OUTLINECOLOR 0 255 0<BR>END<BR>TEMPLATE=20
    "x"<BR>END<BR>END<BR><BR>Setup a web page like=20
    this:<BR><BR>&lt;html&gt;<BR>&lt;head&gt;<BR>&lt;?<BR>$parcel_ids =
=3D=20
    "1|2|3|4|5";<BR><BR>if (PHP_OS =3D=3D "WINNT" || PHP_OS =3D=3D=20
    =
"WIN32")<BR>dl("php_mapscript.dll");<BR>else<BR>dl("php_mapscript.so");<B=
R><BR>$map=20
    =3D ms_newMapObj("parcels.map");<BR>$layer =3D=20
    $map-&gt;getLayerByName("parcels");<BR><BR>//=20
    Query.<BR>$layer-&gt;queryByAttributes("", "/".$parcel_ids."/",=20
    MS_MULTIPLE);<BR>// If you want to avoid errors when no matches are =
found=20
    use the ampersand<BR>// in the above statement like this:=20
    @$layer-&gt;queryByAttributes();<BR><BR>// Render an image and get =
its=20
    URL.<BR>$img =3D $map-&gt;drawQuery();<BR>$url =3D =
$img-&gt;saveWebImage(MS_PNG,=20
    1, 1,=20
    =
0);<BR>$img-&gt;free();<BR>?&gt;<BR>&lt;/head&gt;<BR>&lt;body&gt;<BR>&lt;=
img=20
    src=3D"&lt;? echo $url; ?&gt;" /&gt;<BR>&lt;?<BR>if=20
    ($layer-&gt;getNumResults() &gt; 0)<BR>echo =
$layer-&gt;getNumResults()."=20
    parcels found.";<BR>else<BR>echo "No parcels=20
    found.";<BR>?&gt;<BR>&lt;/body&gt;<BR>&lt;/html&gt;<BR><BR>Now that =
I look=20
    at it, the last thing you may have been missing was the =
mapObj::queryMap()=20
    method. Anyhow, I hope this helps.<BR><BR>-Abe<BR><?/smaller><BR>On =
Jan 22,=20
    2005, at 10:07 PM, Steve Lehr wrote:<BR><BR>
    <BLOCKQUOTE>Abe:<BR><BR>I appreciate the help, still not getting it=20
      though. I'm wondering if I need<BR>to draw out the map after =
rendering?=20
      I've sceen other posts but no real<BR>solutions...<BR><BR>I'll =
start from=20
      scratch rather then trying to reuse something I have. If<BR>anyone =
else=20
      has a more complete example I'd really appreciate seeing=20
      it.<BR><BR>Thanks<BR><BR>Steven Lehr<BR>Assistant =
Professor<BR>Freshmen=20
      Program<BR>College of Engineering<BR>Embry-Riddle Aeronautical =
University=20
      (LB159)<BR>600 S. Clyde Morris Blvd.<BR>Daytona Beach, FL=20
      32114-3900<BR>386-226-7740<BR><BR>-----Original =
Message-----<BR>From: UMN=20
      MapServer Users List =
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On<BR>Behalf Of=20
      Abe Gillespie<BR>Sent: Saturday, January 22, 2005 8:22 PM<BR>To:=20
      MAPSERVER-USERS at LISTS.UMN.EDU<BR>Subject: Re: =
[UMN_MAPSERVER-USERS] PHP=20
      Highlight list of Parcels Passed<BR>In<BR><BR><BR>Something else I =

      noticed. You shouldn't even have to setup a separate<BR>layer to =
show=20
      queried parcels (though there are ways to do this). I<BR>suggest =
starting=20
      out with one layer that renders queried and<BR>non-queried parcels =
at the=20
      same time. Once you get the hang of that<BR>then you can do two =
different=20
      layers (if you still even want to). Make<BR>the layer like=20
      this:<BR><BR>LAYER<BR>NAME "parcels"<BR>DATA "parcels"<BR>STATUS=20
      on<BR>TYPE polygon<BR>CLASS<BR>OUTLINECOLOR 0 255 =
0<BR>END<BR>TEMPLATE "x"=20
      # Must be present to query on (though "x" means<BR>absolutely=20
      nothing).<BR>END<BR><BR>The above layer will render all your =
parcels green=20
      outline with hollow<BR>fill. Then when you use the PHP code to =
query it=20
      will render your<BR>queried parcels red. This assumes you have =
QUERYMAP=20
      setup correctly.<BR><BR>-Abe<BR><BR>On Jan 22, 2005, at 7:12 PM, =
Steve=20
      Lehr wrote:<BR><BR>
      <BLOCKQUOTE>Abe I've never used the QUERY MAP before, I tried =
putting it=20
        in the<BR>layer<BR>and it did not like that?<BR><BR>My initial =
layer=20
        looks like:<BR><BR>I changed my code to pass Pipe =
delimited.<BR><BR>But=20
        I'm not quite certian I'm still getting what I need to do to=20
        my<BR>.map.<BR><BR>Thanks for the help..below is the layer =
repeated my=20
        EXPRESSION is<BR>trashed I<BR>realize.<BR><BR>
        <BLOCKQUOTE>LAYER<BR>NAME "selected_parcels"<BR>DATA =
parcels<BR>STATUS=20
          DEFAULT<BR>TYPE POLYGON<BR>CLASSITEM =
QPID<BR>CLASS<BR>EXPRESSION=20
          "/%parcels%/"<BR>COLOR 255 0=20
        0<BR>END<BR>END<BR></BLOCKQUOTE><BR><BR>Steven Lehr<BR>Assistant =

        Professor<BR>Freshmen Program<BR>College of =
Engineering<BR>Embry-Riddle=20
        Aeronautical University (LB159)<BR>600 S. Clyde Morris =
Blvd.<BR>Daytona=20
        Beach, FL 32114-3900<BR>386-226-7740<BR><BR>-----Original=20
        Message-----<BR>From: UMN MapServer Users List=20
        [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On<BR>Behalf Of Abe=20
        Gillespie<BR>Sent: Saturday, January 22, 2005 7:05 PM<BR>To:=20
        MAPSERVER-USERS at LISTS.UMN.EDU<BR>Subject: Re: =
[UMN_MAPSERVER-USERS] PHP=20
        Highlight list of Parcels Passed<BR>In<BR><BR><BR>For the red =
you need=20
        to setup the QUERYMAP. For the PHP it will be<BR>something like=20
        this:<BR><BR>$target =3D=20
        =
use_appropriate_string_func_to_conver_semi_to_pipe($parcels);<BR>//=20
        $target should look like "1|2|3|4" ... where the numbers are=20
        the<BR>IDs.<BR>$layer =3D=20
        =
$map-&gt;getLayerByName("parcels");<BR>$layer-&gt;queryByAttributes("parc=
el_id_field",=20
        "/".$target."/",<BR>MS_MULTIPLE);<BR><BR>Also, don't forget to =
add the=20
        TEMPLATE "x" tag in your LAYER<BR>definition.<BR><BR>I'm not a =
RegEx=20
        expert, so someone please put me in check if I'm<BR>leading =
Steven=20
        astray.<BR><BR>-Abe<BR><BR>On Jan 22, 2005, at 6:37 PM, Steve =
Lehr=20
        wrote:<BR><BR>
        <BLOCKQUOTE>I'm trying to write some PHP that I can send extents =
and=20
          list of<BR>parcels to<BR>get it to highlight the =
parcels.<BR><BR>I'd=20
          like to highlight all the found parcels in RED.<BR><BR>My php =
gets a=20
          variable by post called parcels and contains at this<BR>time =
a<BR>semi=20
          colon delimited list of ids in the attribute column QPID of=20
          the<BR>parcels.dbf.<BR><BR>LAYER<BR>NAME =
"selected_parcels"<BR>DATA=20
          parcels<BR>STATUS DEFAULT<BR>TYPE POLYGON<BR>CLASSITEM=20
          QPID<BR>CLASS<BR>EXPRESSION "/%parcels%/"<BR>COLOR 255 0=20
          0<BR>END<BR>END<BR><BR><BR>I've got my extents. I've got the =
list of=20
          parcels. Now I want to<BR>highlight<BR>the list of parcels =
with=20
          something like the below. But I have to do<BR>something in php =
to take=20
          that ; delimited list and the turn on all the<BR>matching =
attributes.=20
          (I belive its a QUERYMAP with MULTIPLE_SELECT)<BR>but =
I'm<BR>having=20
          trouble getting my brain around what I need to code -=20
          might<BR>someone<BR>have a sample.<BR><BR>Thanks<BR><BR>Steven =

          Lehr<BR>Assistant Professor<BR>Freshmen Program<BR>College of=20
          Engineering<BR>Embry-Riddle Aeronautical University =
(LB159)<BR>600 S.=20
          Clyde Morris Blvd.<BR>Daytona Beach, FL=20
          =
32114-3900<BR>386-226-7740<BR><BR></BLOCKQUOTE><BR></BLOCKQUOTE><BR></BLO=
CKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_002B_01C5044E.97F4A500--

------------------------------

Date:    Thu, 27 Jan 2005 08:07:55 -0600
From:    Kevin Grootendorst <kgrootendorst at BAIRD.COM>
Subject: Re: Zoom to custom extent - PHP

Bill,
OK, now we're getting somewhere.  I included the following before the if
statement:
echo '<pre>';
print_r ($http_form_vars);
echo '</pre>';

On a normal page load, the following is returned:

Array
(
    [0] =>
)


When I select the 'QuickZoom' feature, I receive the following:

Array
(
    [WMSlayers] => 1
    [layer_status] => Array
        (
            [0] => New York Counties
            [1] => Ontario Municipalities
        )

    [ViewRegion] => 7200000,833270,7291840,894520
    [PrevStateKey] =>
BBOX=7121000,814428.33333333,7600000,1133571.6666667|SRS=init%3Depsg%
3A50000|MAPSIZE=600,400|LAYERS=0,1
    [NotFirstLoad] => 1
    [RosaMode] => 1
    [ROSA_CMD] =>
    [INPUT_TYPE] =>
    [INPUT_COORD] =>
    [QueryString] =>
    [doQuickZoom] => 1
)

Note that the page just refreshes with the current extents.  It did not
zoom to the municipality I selected.  However, the $adExtents[n] variables
are being set to the right extents.

Kevin





On Thu, 27 Jan 2005 06:38:25 -0500, William Bronsema
<wbronsema at DMSOLUTIONS.CA> wrote:

>Kevin,
>
>PHP variables are case sensitive.  I just took a quick peek at the code you
>sent me earlier.  Your app uses $http_form_vars not $HTTP_FORM_VARS.
>
>Try changing to $http_form_vars and let me know how it goes.
>
>Regards,
>Bill
>
>
>________________________________________________
>William A. Bronsema, C.E.T.
>Applications and Software Development,
>DM Solutions Group Inc.
>
>
>
>
>> -----Original Message-----
>> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] On
>> Behalf Of Kevin Grootendorst
>> Sent: January 26, 2005 3:42 PM
>> To: MAPSERVER-USERS at lists.umn.edu
>> Subject: Re: [UMN_MAPSERVER-USERS] Zoom to custom extent - PHP
>>
>> Bill,
>> I added that code, right before the IF statement.
>> There was no output...
>> Does that tell us that ($HTTP_FORM_VARS) is null?
>> ?
>>
>>
>> On Wed, 26 Jan 2005 15:20:01 -0500, William Bronsema
>> <wbronsema at DMSOLUTIONS.CA> wrote:
>>
>> >Kevin,
>> >
>> >It sounds like $HTTP_FORM_VARS['doQuickZoom'] is not being set.
>> >
>> >Add this:
>> >echo '<pre>';
>> >print_r( $HTTP_FORM_VARS );
>> >echo '</pre>';
>> >
>> >just before the if statement and send me the output for both an intial
>> page
>> >load and quickzoom page load.  This will tell us exactly what is being
>> set
>> >(or not set ;) ).
>> >
>> >Regards,
>> >Bill
>> >
>> >
>> >
>> >________________________________________________
>> >William A. Bronsema, C.E.T.
>> >Applications and Software Development,
>> >DM Solutions Group Inc.
>> >
>> >
>> >
>> >> -----Original Message-----
>> >> From: Kevin Grootendorst [mailto:kgrootendorst at BAIRD.COM]
>> >> Sent: January 26, 2005 3:12 PM
>> >> To: MAPSERVER-USERS at LISTS.UMN.EDU; William Bronsema
>> >> Subject: Re: Zoom to custom extent - PHP
>> >>
>> >> Bill,
>> >> OK.  This makes sense.
>> >>
>> >> But, using the following statement:
>> >> If ( isset( $HTTP_FORM_VARS['doQuickZoom']) && $HTTP_FORM_VARS
>> >> ['doQuickZoom'] == "1" )
>> >> This returns a false, and the QuickZoom php code is not executed.
>> >>
>> >> Using this statement:
>> >> If ( isset( $HTTP_FORM_VARS['doQuickZoom']) && $HTTP_FORM_VARS
>> >> ['doQuickZoom'] == "" )
>> >> Also returns a false.
>> >>
>> >> Using this statement:
>> >> If ($HTTP_FORM_VARS['doQuickZoom'] == "")
>> >> Returns a TRUE - and the php code is executed.  But the map does not
>> draw
>> >> to the desired extents.  It just refreshes the current map extent.
>> >>
>> >> Thanks.
>> >>
>> >> Kevin
>> >>
>> >>
>> >> On Wed, 26 Jan 2005 14:52:35 -0500, William Bronsema
>> >> <wbronsema at DMSOLUTIONS.CA> wrote:
>> >>
>> >> >Kevin,
>> >> >
>> >> >doQuickZoom is supposed to go back to "".  echo
>> >> >$HTTP_FORM_VARS['doQuickZoom'] before your "If ( isset(
>> >> >$HTTP_FORM_VARS['doQuickZoom'])...." statement to see what I mean.
It
>> >> >should only echo 1 after a quick zoom is called.  You only want it to
>> be
>> >> 1
>> >> >when you want to do a quick zoom.  Make sense?
>> >> >
>> >> >Is the PHP code being called to perform the quick zoom and the map is
>> >> just
>> >> >not zooming?  Or is the PHP code not being called?
>> >> >
>> >> >Regards,
>> >> >Bill
>> >> >
>> >> >________________________________________________
>> >> >William A. Bronsema, C.E.T.
>> >> >Applications and Software Development,
>> >> >DM Solutions Group Inc.
>> >> >

------------------------------

Date:    Thu, 27 Jan 2005 09:10:00 -0500
From:    "Palanisamy, Giri" <palanisamyg at ORNL.GOV>
Subject: PHP-Mapserver query result

Hi List,

Sorry for this repeated postings, but I still could not figure out a
solution, I would really appreciate if any one can give me some idea for
the problem discussed below.

I just got the php-mapscript (rosa) GMap sample application running, I
would like to display the query results in a new page, the sample
application does it in the same page (when I press the "info" button and
click some points on the map it displays the city names in the same
page)? I could achieve this in JBox-mapscript application by setting the
TEMPLATE in the class object in the .map file as

LAYER
  NAME fluxnet_ll_use
    METADATA
    "DESCRIPTION"   "Sites"
    "RESULT_FIELDS" "SITE_LABEL NETWORK COUNTRY STATUS IGBPCLSS CLIMATE
LONG LAT "
  END
  GROUP MODIS
  TYPE POINT
  DATA f264
  STATUS DEFAULT
  PROJECTION
        "proj=3Dlonglat"
        "ellps=3DGRS80"
        "no_defs"
  END
 =20
  CLASS
    NAME 'FLUXNET Sites'
    COLOR 0 0 255
    SYMBOL 'triangle'
    SIZE 10
    TEMPLATE "fluxsites.phtml"   =20
  END
=20
  TOLERANCE 5  =20
END


I would really appreciate if anyone can tell me how to do this with the
php-mapscript (rosa)?

Thanks

Giri

------------------------------

Date:    Thu, 27 Jan 2005 09:07:36 -0500
From:    Jeff Portwine <jdport at VERITIME.COM>
Subject: Re: layers are not drawn

I notice you specified your paths as /root/...   I am not familiar with your
OS or how you've setup your filesystem and thus I am not sure if /root is
referring to the web server root or your actual root directory but just in
case I thought I'd mention to make sure that those directories are readable
by the "web user"... whether that user is nobody (as is often the case with
apache) or some other user name.   I think if those permissions are bad it
would cause the behavior you described...

I'm still a newbie so I'll defer to the experts for any suggestions beyond
that :)

-Jeff

----- Original Message -----
From: "Alex Chimarios" <alhim at INTRACOM.GR>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Thursday, January 27, 2005 8:50 AM
Subject: [UMN_MAPSERVER-USERS] layers are not drawn


> Hi,
>
> I am trying to port mapscript to arm-linux for iPAQ PDA in order to create
> a
> demo application loading just one map.
>
> I have cross-compiled for arm-linux the following libraries :
> proj-4.4.7
> gdal-1-1-9
> freetype2
> gd-2.0.25 with png, jpeg and freetype support
>
> I have used libpng ,lipjpeg, libX11 and libxpm from binaries coming with
> Familiar Linux distro for PDA.
>
> Finally I cross-compiled mapserver and mapscript.
>
> However, when I try to run a simple program in mapscript, the map is drwan
> without any layers on it!!! Just the background .
>
> Can you give me a tip ? I think it may be a lib error. Which lib is
> responsible if layers are not drawn ?
>
>
> p.s : this is my map file :
>
> MAP
>
> NAME Mediteranean
>
> STATUS ON
> SIZE 600 600
> EXTENT 2.5256 21.5595 34.1734 53.2078
>
>
>
> SHAPEPATH "/root/gistest"
>
>
> IMAGECOLOR 50 200 200
> IMAGETYPE PNG
> INTERLACE ON
>
>
>
> PROJECTION
> "init=epsg:4326"
> END
> WEB
>        IMAGEPATH "/root/"
>        IMAGEURL "/root/"
>    END
>
>
>
>
> LAYER
>
> NAME "cities"
>
> STATUS ON
> DATA cities
> TYPE POINT
> PROJECTION
> "init=epsg:4326"
> END
>
> LABELITEM "NAME"
>
>        CLASS
>
>
>                STYLE
>                        COLOR 255 255 0
>
>                        SYMBOL "/root/gistest/ctyhwy.png"
>                END
>
>        LABEL
>                COLOR 255 255 0
>                SIZE tiny
>                #FONT arial
>                POSITION CL
>                PARTIALS TRUE
>                ANTIALIAS TRUE
>                MINDISTANCE 30
>                BUFFER 1
>        END
>        END
> END
>

------------------------------

Date:    Thu, 27 Jan 2005 08:14:23 -0600
From:    Kevin Grootendorst <kgrootendorst at BAIRD.COM>
Subject: Re: PHP-Mapserver query result

Giri,
I don't know exactly how to solve your problem, but have you tried using
MapLab to create an application?  By default, querying a MapLab application
will launch a separate window with the query results.
Maybe that might help?

Kevin

On Thu, 27 Jan 2005 09:10:00 -0500, Palanisamy, Giri <palanisamyg at ORNL.GOV>
wrote:

>Hi List,
>
>Sorry for this repeated postings, but I still could not figure out a
>solution, I would really appreciate if any one can give me some idea for
>the problem discussed below.
>
>I just got the php-mapscript (rosa) GMap sample application running, I
>would like to display the query results in a new page, the sample
>application does it in the same page (when I press the "info" button and
>click some points on the map it displays the city names in the same
>page)? I could achieve this in JBox-mapscript application by setting the
>TEMPLATE in the class object in the .map file as
>
>LAYER
>  NAME fluxnet_ll_use
>    METADATA
>    "DESCRIPTION"   "Sites"
>    "RESULT_FIELDS" "SITE_LABEL NETWORK COUNTRY STATUS IGBPCLSS CLIMATE
>LONG LAT "
>  END
>  GROUP MODIS
>  TYPE POINT
>  DATA f264
>  STATUS DEFAULT
>  PROJECTION
>        "proj=longlat"
>        "ellps=GRS80"
>        "no_defs"
>  END
>
>  CLASS
>    NAME 'FLUXNET Sites'
>    COLOR 0 0 255
>    SYMBOL 'triangle'
>    SIZE 10
>    TEMPLATE "fluxsites.phtml"
>  END
>
>  TOLERANCE 5
>END
>
>
>I would really appreciate if anyone can tell me how to do this with the
>php-mapscript (rosa)?
>
>Thanks
>
>Giri

------------------------------

Date:    Thu, 27 Jan 2005 09:22:14 -0500
From:    "Palanisamy, Giri" <palanisamyg at ORNL.GOV>
Subject: Re: PHP-Mapserver query result

Kevin,

Thanks for the suggestion, but I have almost customized my demo
application with the help of GMap sample app, and this is the final part
I need to find out!

Giri


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Kevin Grootendorst
Sent: Thursday, January 27, 2005 9:14 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] PHP-Mapserver query result

Giri,
I don't know exactly how to solve your problem, but have you tried using
MapLab to create an application?  By default, querying a MapLab
application
will launch a separate window with the query results.
Maybe that might help?

Kevin

On Thu, 27 Jan 2005 09:10:00 -0500, Palanisamy, Giri
<palanisamyg at ORNL.GOV>
wrote:

>Hi List,
>
>Sorry for this repeated postings, but I still could not figure out a
>solution, I would really appreciate if any one can give me some idea
for
>the problem discussed below.
>
>I just got the php-mapscript (rosa) GMap sample application running, I
>would like to display the query results in a new page, the sample
>application does it in the same page (when I press the "info" button
and
>click some points on the map it displays the city names in the same
>page)? I could achieve this in JBox-mapscript application by setting
the
>TEMPLATE in the class object in the .map file as
>
>LAYER
>  NAME fluxnet_ll_use
>    METADATA
>    "DESCRIPTION"   "Sites"
>    "RESULT_FIELDS" "SITE_LABEL NETWORK COUNTRY STATUS IGBPCLSS CLIMATE
>LONG LAT "
>  END
>  GROUP MODIS
>  TYPE POINT
>  DATA f264
>  STATUS DEFAULT
>  PROJECTION
>        "proj=3Dlonglat"
>        "ellps=3DGRS80"
>        "no_defs"
>  END
>
>  CLASS
>    NAME 'FLUXNET Sites'
>    COLOR 0 0 255
>    SYMBOL 'triangle'
>    SIZE 10
>    TEMPLATE "fluxsites.phtml"
>  END
>
>  TOLERANCE 5
>END
>
>
>I would really appreciate if anyone can tell me how to do this with the
>php-mapscript (rosa)?
>
>Thanks
>
>Giri

------------------------------

Date:    Thu, 27 Jan 2005 08:23:05 -0600
From:    Mark Adams <markadams at CUESTASYS.COM>
Subject: Re: Debug Logging

On a windows system I have found that adding an environment variable
through Control Panel (MS_ERRORFILE = <path><filename>) seems to work. I
must have got that idea from this list at some point....

Cheers.

-Mark Adams

------------------------------

Date:    Thu, 27 Jan 2005 16:09:27 +0200
From:    Alexandros Chimarios <alhim at INTRACOM.GR>
Subject: Re: layers are not drawn

Thanx for answering  Jeff,

actually I don't use the mapserv CGI application but Python mapscript.
Therefore I dont think so that the problem has to do with the user's
permisions. I run everything as a root. There must be a problem with some lib
propably.




On Thursday 27 January 2005 16:07, Jeff Portwine wrote:
> I notice you specified your paths as /root/...   I am not familiar with
> your OS or how you've setup your filesystem and thus I am not sure if /root
> is referring to the web server root or your actual root directory but just
> in case I thought I'd mention to make sure that those directories are
> readable by the "web user"... whether that user is nobody (as is often the
> case with apache) or some other user name.   I think if those permissions
> are bad it would cause the behavior you described...
>
> I'm still a newbie so I'll defer to the experts for any suggestions beyond
> that :)
>
> -Jeff
>
> ----- Original Message -----
> From: "Alex Chimarios" <alhim at INTRACOM.GR>
> To: <MAPSERVER-USERS at LISTS.UMN.EDU>
> Sent: Thursday, January 27, 2005 8:50 AM
> Subject: [UMN_MAPSERVER-USERS] layers are not drawn
>
> > Hi,
> >
> > I am trying to port mapscript to arm-linux for iPAQ PDA in order to
> > create a
> > demo application loading just one map.
> >
> > I have cross-compiled for arm-linux the following libraries :
> > proj-4.4.7
> > gdal-1-1-9
> > freetype2
> > gd-2.0.25 with png, jpeg and freetype support
> >
> > I have used libpng ,lipjpeg, libX11 and libxpm from binaries coming with
> > Familiar Linux distro for PDA.
> >
> > Finally I cross-compiled mapserver and mapscript.
> >
> > However, when I try to run a simple program in mapscript, the map is
> > drwan without any layers on it!!! Just the background .
> >
> > Can you give me a tip ? I think it may be a lib error. Which lib is
> > responsible if layers are not drawn ?
> >
> >
> > p.s : this is my map file :
> >
> > MAP
> >
> > NAME Mediteranean
> >
> > STATUS ON
> > SIZE 600 600
> > EXTENT 2.5256 21.5595 34.1734 53.2078
> >
> >
> >
> > SHAPEPATH "/root/gistest"
> >
> >
> > IMAGECOLOR 50 200 200
> > IMAGETYPE PNG
> > INTERLACE ON
> >
> >
> >
> > PROJECTION
> > "init=epsg:4326"
> > END
> > WEB
> >        IMAGEPATH "/root/"
> >        IMAGEURL "/root/"
> >    END
> >
> >
> >
> >
> > LAYER
> >
> > NAME "cities"
> >
> > STATUS ON
> > DATA cities
> > TYPE POINT
> > PROJECTION
> > "init=epsg:4326"
> > END
> >
> > LABELITEM "NAME"
> >
> >        CLASS
> >
> >
> >                STYLE
> >                        COLOR 255 255 0
> >
> >                        SYMBOL "/root/gistest/ctyhwy.png"
> >                END
> >
> >        LABEL
> >                COLOR 255 255 0
> >                SIZE tiny
> >                #FONT arial
> >                POSITION CL
> >                PARTIALS TRUE
> >                ANTIALIAS TRUE
> >                MINDISTANCE 30
> >                BUFFER 1
> >        END
> >        END
> > END

------------------------------

Date:    Thu, 27 Jan 2005 15:36:16 +0100
From:    Nicole Faust <n_faust at INFORMATIK.UNI-KL.DE>
Subject: Re: installation problems [was Re: Example Maps]

Hello,

This are the options that I used, to configure PHP:

./configure --with-gd=/home/n_faust/software/projekt
--with-pgsql=/home/n_faust/software/projekt --enable-force-cgi-redirect
--enable-fastcgi --prefix=/home/n_faust/software/projekt

Are there any options missing?

Regards,
  Nicole


On Tue, 25 Jan 2005, Julien-Samuel Lacroix wrote:

> Hi,
>
> Check the installation instruction for your OS:
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScript
>
> Normally adding --enable-force-cgi-redirect to your configure command
> should do the job.

------------------------------

Date:    Thu, 27 Jan 2005 15:46:41 +0100
From:    Nicole Faust <n_faust at INFORMATIK.UNI-KL.DE>
Subject: Re: Example Maps

Hello,

> I am also using the examples, and I want to make the usa.map work but it doesn't.
> Does it work for you?
> Did you see anything wrong?
> I am working with:
>
> MapServer version 4.4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=GDAL INPUT=SHAPEFILE


I have still problems display the map, too.

I work with:
MapServer version 4.2.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=EPPL7
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

I changed the following path (in the WEB section) in the .MAP file
(but it doesn't work anyway):
IMAGEPATH "/home/n_faust/software/projekt/htdocs/karten/tmp/"
IMAGEURL "/karten/tmp"

htdocs is the DocumentRoot of Apache and karten a subdirectory where
I stored the .SHP, .SHX and .MAP files. In the tmp subdirectory the
mapserver stores the generated image files. This works for .PHTML files
but not for .MAP files and I don't know why.

Regards,
    Nicole

------------------------------

Date:    Thu, 27 Jan 2005 10:12:58 -0500
From:    Abe Gillespie <agillesp at VT.EDU>
Subject: Re: Debug Logging

That's precisely what I needed.  Thanks!

-Abe

On Jan 27, 2005, at 9:23 AM, Mark Adams wrote:

> On a windows system I have found that adding an environment variable
> through Control Panel (MS_ERRORFILE = <path><filename>) seems to work.
> I
> must have got that idea from this list at some point....
>
> Cheers.
>
> -Mark Adams
>

------------------------------

Date:    Thu, 27 Jan 2005 15:58:40 +0100
From:    Nicole Faust <n_faust at INFORMATIK.UNI-KL.DE>
Subject: Re: Example Maps

Hello,

I've got the same problem that I couldn't display the
map in my browser.

This is the shapepath of the .MAP file:

SHAPEPATH "/home/n_faust/software/projekt/htdocs/karten"


This is the WEB section of the .MAP file:

WEB
  IMAGEPATH "/home/n_faust/software/projekt/htdocs/karten/tmp/"
  IMAGEURL"/karten/tmp/"
END

If I use the .PHTML files instead of the .MAP files, the mapserver
generates a output image file, which is stored in the directory named
by IMAGEURL.

The directory /home/n_faust/software/projekt/htdocs is the DocumentRoot
of Apache.

Did I made something wrong?

Regards,
  Nicole

On Wed, 26 Jan 2005, Ingo Paulsen wrote:

> Hello,
>
> I fixed the problem by replacing the IMAGEURL path with IMAGEPATH entry.
> Did you take a look in your /var/www/html/tmp/ directory? Are there any
> dynamically created .png files?
>
> WEB
>          IMAGEPATH "/var/www/html/tmp/"
>          IMAGEURL "/var/www/html/tmp/"
> END
>
> I suppose you have installed the shapefiles in /var/www/html/data.
>
>
> Best regards
> Ingo
>
>
> > I am also using the examples, and I want to make the usa.map work but
> > it doesn't.
> >  Does it work for you?
> > Did you see anything wrong?
> > I am working with:
> >
> > MapServer version 4.4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> > SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=EPPL7
> > INPUT=GDAL INPUT=SHAPEFILE
> >
> > So I think that if I have gdal it should recognize .tif files and
> > should work. But it doesn't
>
>

------------------------------

Date:    Thu, 27 Jan 2005 10:12:18 -0500
From:    Stephen Woodbridge <woodbri at SWOODBRIDGE.COM>
Subject: Re: Aggregate query

Benjamin Lloyd-Hughes wrote:
> Hi
>
> I'm using the cgi mapserver in NQUERY mode to extract values within a user
> defined extent from a point shape file.  The query works fine in so much
> that it returns the desired data and dumps this into the specifed template.
> So far so good... But what I really want to obtain is the average of these
> values.  I've been scratching my head and thought I might be able to do
> something using the EVAL() javascript function but I've not had any joy.  I
> would be very grateful I someone could point me in the direction of a
> solution.

Since you are use a HTML template, I think you are on the right track to
do this in Javascript. I would not use an eval though, I would create
and array initializer and just populate the values directly into the
array. So do something like the following (I will leave the exact syntax
up to you to figure out):

I think you need to break this into three separate files, ie; header,
template and footer so if the file names are header.html, template.heml
and footer.html, you would break up the code like this:

========header.html==============
...
var num_rows = [nr];
var data = new Array(
========template.html============
[DBASE column_name],
========footer.html==============
0);  // probably need the trailing "0" beacue of the comma above
...

// now loop through your array using num_rows to compute whatever

==================================

I'm a little rusty with my javascript and use of query templates, but
this should give you the idea. I am assuming that the mapserver
templating will repeat the [DBASE column_name], line once for every row.
if this is not right maybe some else will post the correct syntax.

-Steve W.

------------------------------

Date:    Thu, 27 Jan 2005 10:32:44 -0500
From:    Stephen Woodbridge <woodbri at SWOODBRIDGE.COM>
Subject: Re: Debug Logging

Also, I think there is a bug in the debug logging or at least a
documentation problem on MS 4.4.1

DEBUG ON
In the map section, then layer timing information goes to stderr which
ends up in the webserver error.log. You can place DEBUG ON in LAYER
block(s) but it seems that this sets the global flag and you get the
same out as if you put it once in the map section, (ie: you don't get
more info by placing it in the LAYER block.

LOG "/path/to/log_file.log"
then only a single line gets written to the log file for each map
regardless of the setting for DEBUG

-Steve W.

Frank Warmerdam wrote:
> On Wed, 26 Jan 2005 19:25:28 -0500, Abe Gillespie <agillesp at vt.edu> wrote:
>
>>Would someone help me get logging working?  I remember there was
>>something on this list about bit I can't seem to locate it.
>>
>>I've got "DEBUG on" for a LAYER and the MAP and I have the LOG path in
>>the WEB.  But I'm getting nothing.
>>
>>I would appreciate instructions for both Windows and Linux but am
>>working with Windows right now.
>
>
> Abe,
>
> Does your "mapserv -v" output report DEBUG=MSDEBUG?  If not, I don't
> think output debug messages is possible.   I would add that in at least
> some circumstances debug messages go to the error_log file.
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>

------------------------------

Date:    Thu, 27 Jan 2005 09:58:42 -0600
From:    John Goecken <jbgoecken at HOTMAIL.COM>
Subject: MapInfo and MapServer point location problem

I have a map in MapInfo with a street layer and a point layer. The point
location shows up correctly in MapInfo. When I create a site with
MapServer that uses those layers it moves the point or the line layer. It
is now showing the point about .06 miles east of the exact location. I
realize this is a small difference but for the project I'm working on it
is important. Has anybody ever seen something like this before where
MapServer moves a point? Thanks.

------------------------------

Date:    Thu, 27 Jan 2005 10:58:14 -0600
From:    Kevin Grootendorst <kgrootendorst at BAIRD.COM>
Subject: Re: Zoom to custom extent - PHP - SOLVED

Bill,
Finally, I was able to get my application working properly.
After I changed $HTTP_FORM_VARS to $http_form_vars, I moved the code in my
app.php file closer to the top of the file.
The application works perfectly.
Thanks for all your help and your php tips, it's greatly appreciated.

Regards,

Kevin


On Thu, 27 Jan 2005 06:38:25 -0500, William Bronsema
<wbronsema at DMSOLUTIONS.CA> wrote:

>Kevin,
>
>PHP variables are case sensitive.  I just took a quick peek at the code you
>sent me earlier.  Your app uses $http_form_vars not $HTTP_FORM_VARS.
>
>Try changing to $http_form_vars and let me know how it goes.
>
>Regards,
>Bill
>
>
>________________________________________________
>William A. Bronsema, C.E.T.
>Applications and Software Development,
>DM Solutions Group Inc.
>
>
>
>
>> -----Original Message-----
>> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] On
>> Behalf Of Kevin Grootendorst
>> Sent: January 26, 2005 3:42 PM
>> To: MAPSERVER-USERS at lists.umn.edu
>> Subject: Re: [UMN_MAPSERVER-USERS] Zoom to custom extent - PHP
>>
>> Bill,
>> I added that code, right before the IF statement.
>> There was no output...
>> Does that tell us that ($HTTP_FORM_VARS) is null?
>> ?
>>
>>
>> On Wed, 26 Jan 2005 15:20:01 -0500, William Bronsema
>> <wbronsema at DMSOLUTIONS.CA> wrote:
>>
>> >Kevin,
>> >
>> >It sounds like $HTTP_FORM_VARS['doQuickZoom'] is not being set.
>> >
>> >Add this:
>> >echo '<pre>';
>> >print_r( $HTTP_FORM_VARS );
>> >echo '</pre>';
>> >
>> >just before the if statement and send me the output for both an intial
>> page
>> >load and quickzoom page load.  This will tell us exactly what is being
>> set
>> >(or not set ;) ).
>> >
>> >Regards,
>> >Bill
>> >
>> >
>> >
>> >________________________________________________
>> >William A. Bronsema, C.E.T.
>> >Applications and Software Development,
>> >DM Solutions Group Inc.
>> >
>> >
>> >
>> >> -----Original Message-----
>> >> From: Kevin Grootendorst [mailto:kgrootendorst at BAIRD.COM]
>> >> Sent: January 26, 2005 3:12 PM
>> >> To: MAPSERVER-USERS at LISTS.UMN.EDU; William Bronsema
>> >> Subject: Re: Zoom to custom extent - PHP
>> >>
>> >> Bill,
>> >> OK.  This makes sense.
>> >>
>> >> But, using the following statement:
>> >> If ( isset( $HTTP_FORM_VARS['doQuickZoom']) && $HTTP_FORM_VARS
>> >> ['doQuickZoom'] == "1" )
>> >> This returns a false, and the QuickZoom php code is not executed.
>> >>
>> >> Using this statement:
>> >> If ( isset( $HTTP_FORM_VARS['doQuickZoom']) && $HTTP_FORM_VARS
>> >> ['doQuickZoom'] == "" )
>> >> Also returns a false.
>> >>
>> >> Using this statement:
>> >> If ($HTTP_FORM_VARS['doQuickZoom'] == "")
>> >> Returns a TRUE - and the php code is executed.  But the map does not
>> draw
>> >> to the desired extents.  It just refreshes the current map extent.
>> >>
>> >> Thanks.
>> >>
>> >> Kevin
>> >>
>> >>
>> >> On Wed, 26 Jan 2005 14:52:35 -0500, William Bronsema
>> >> <wbronsema at DMSOLUTIONS.CA> wrote:
>> >>
>> >> >Kevin,
>> >> >
>> >> >doQuickZoom is supposed to go back to "".  echo
>> >> >$HTTP_FORM_VARS['doQuickZoom'] before your "If ( isset(
>> >> >$HTTP_FORM_VARS['doQuickZoom'])...." statement to see what I mean.
It
>> >> >should only echo 1 after a quick zoom is called.  You only want it to
>> be
>> >> 1
>> >> >when you want to do a quick zoom.  Make sense?
>> >> >
>> >> >Is the PHP code being called to perform the quick zoom and the map is
>> >> just
>> >> >not zooming?  Or is the PHP code not being called?
>> >> >
>> >> >Regards,
>> >> >Bill
>> >> >
>> >> >________________________________________________
>> >> >William A. Bronsema, C.E.T.
>> >> >Applications and Software Development,
>> >> >DM Solutions Group Inc.
>> >> >

------------------------------

Date:    Thu, 27 Jan 2005 16:58:10 +0000
From:    JEFFERY C COATE <pawbhaji at MSN.COM>
Subject: <No subject given>

Hi,  I'm a first-time poster.  Hope this makes sense:

I'd appreciate any ideas on calculating imgext in projected coordinates
around a lat/lon point.  Can mapserver project a DD imgext on the fly?  Or,
can I make a separate call to mapserver to project a lat/lon point prior to
building an imgext?  My limitation (one, anyway) is that I'm using basic cgi
mapserver at this point.

Here's why I'm asking:  I have mapserver displaying gps points using OGR.  I
also display the gps and related data in tabular format.  Links in the table
zoom the map - the link passes the record's lat/lon to a javascript function
which builds a new imgext around the point, passes that to the template file
and resubmits the cgi url.  This works great if map is in geographic
coordinates but not if it is projected.


Thanks,

Jeff Coate
GIS Rangers

------------------------------

Date:    Thu, 27 Jan 2005 09:29:02 -0800
From:    Ken Lord <kenlord at GMAIL.COM>
Subject: Re: MapInfo and MapServer point location problem

Hi John,

Confirm that your map projections are set right. If that particular
layer is set wrong it could appear slightly (or a lot) off of where
you expect it, Or, if that layer is right but your output projection
is set wrong it could also show a shift.

Cheers,
Ken Lord
Vancouver BC




On Thu, 27 Jan 2005 09:58:42 -0600, John Goecken <jbgoecken at hotmail.com> wrote:
> I have a map in MapInfo with a street layer and a point layer. The point
> location shows up correctly in MapInfo. When I create a site with
> MapServer that uses those layers it moves the point or the line layer. It
> is now showing the point about .06 miles east of the exact location. I
> realize this is a small difference but for the project I'm working on it
> is important. Has anybody ever seen something like this before where
> MapServer moves a point? Thanks.
>

------------------------------

Date:    Thu, 27 Jan 2005 11:29:10 -0600
From:    Camden Daily <cdaily at GMAIL.COM>
Subject: Re: Converting lat/long distance to miles.

Thanks for the suggestions everyone, but I still can't figure this out.

I've added projection blocks for all of my layers and an output
projection as well (epsg 4326 for lat/long).  The difficulties I'm
having seem to be mostly based on the fact that I initially need to
set my extents and place various points on the map using lat/long with
units of decimal degrees.  However, when I then calculate my
distances, I'd like the results in miles.

It seems to me that I should be able to set my extents, place my
points, then reproject both the points and the layer I'm searching
against to a projection that uses meters (which I can easily convert
to miles) for the distance calculations, but this just isn't working
for me.

Here's the code I'm using to try to find distances:

  // clone the layer
  $layer = $map->getLayerByName($layer_name);
  $temp_layer = ms_newLayerObj($map, $layer);

  // clone the point
  $temp_point = ms_newPointObj();
  $temp_point->setXY($point->x, $point->y);

  // project cloned point and layer to NAD83 / Illinois East so that
our calculated distance are in meters, not dd
  $temp_point->project(ms_newprojectionobj("init=epsg:4326"),
ms_newprojectionobj("init=epsg:26971"));
  $temp_layer->setProjection("init=epsg:26971");

  // the toleranceunits don't have to be the same as the projection
units to work
  $temp_layer->set("toleranceunits", MS_MILES);

  $tolerance = 1;
  $found_flag = false;
  while (!$found_flag AND ($tolerance < 30)) {
    $temp_layer->set("tolerance", $tolerance);
    $temp_layer->queryByPoint($temp_point, MS_MULTIPLE, -1);
    $num_results = $temp_layer->getNumResults();
    if ($num_results > 0) {
      $found_flag = true; }
    else {
      $tolerance += 1; }
  }

  echo $num_results;

If I comment out the two lines that reproject the point and layer, it
works perfectly, except that my distance is in dd.  With the
reprojections, I don't get any results at all.  I don't think it's an
issue with my toleranceunits being in miles, since it works fine that
way even when my projections are in units of dd.

Any insights would be greatly appreciated.

------------------------------

Date:    Thu, 27 Jan 2005 12:15:36 -0600
From:    Camden Daily <cdaily at GMAIL.COM>
Subject: Re: Converting lat/long distance to miles.

Ah, I seem to have it now.  Instead of reprojectiong the point and
layer before my querybypoint calls, I reproject the point and the
individual shapes before I do my distancetoshape calls.  I don't
exactly understand why the previous method didn't work, but I got it
now.

Here's the working function I'm using to find the closest shape to a
point and the distance in meters, as opposed to latlong:

function get_closest($layer, $point) {
  global $map;

  $layer = $map->getLayerByName($layer);
  $layer->set("toleranceunits", MS_MILES);

  // loop through, increasing the tolerance each time until we find some matches
  $tolerance = 1;
  $found_flag = false;
  while (!$found_flag AND ($tolerance < 30)) {
    $layer->set("tolerance", $tolerance);
    $layer->queryByPoint($point, MS_MULTIPLE, -1);
    $num_results = $layer->getNumResults();
    if ($num_results > 0) {
      $found_flag = true; }
    else {
      $tolerance += 1; }
  }

  if ($num_results == 0) {
    return array(-1); }
  else {
    // clone the point
    $temp_point = ms_newPointObj();
    $temp_point->setXY($point->x, $point->y);

    // project cloned point to NAD83 / Illinois East so that our
calculated distance are in meters, not dd
    $temp_point->project(ms_newprojectionobj("init=epsg:4326"),
ms_newprojectionobj("init=epsg:26971"));

    // set our min_distance to a very large value
    $min_distance = 999999999999;

    // loop through our results and see which on is closest
    $layer->open();
    for ($i=0; $i < $num_results; $i++) {
      $result = $layer->getResult($i);
      $shape = $layer->getShape($result->tileindex, $result->shapeindex);
      // reproject our shape to the same projection as our cloned point
      $shape->project(ms_newprojectionobj("init=epsg:4326"),
ms_newprojectionobj("init=epsg:26971"));
      $distance = $temp_point->distanceToShape($shape);
      if ($distance < $min_distance) {
        $min_distance = $distance;
        $closest = $shape; }
    }
    $layer->close();
    return array($min_distance, $closest);
  }
}

Thanks again for the help everyone!

------------------------------

Date:    Thu, 27 Jan 2005 10:16:00 -0800
From:    Blaine Hackett <blaine_hack1 at YAHOO.COM>
Subject: shifting .gif colors

All

I have a mapserver app showing roads, counties, road
symbols, text, etc.

When I zoom in or out, I get odd looking color
changes mostly for the symbols.  What is supposed to
be red might show up as a different color, many times
dull green or brown, until I zoom in and then it is
turns red.

I am using .gifs. I imagine it has to do with web safe
colors but am not sure how to fix it and have found no
answers on the web. Anyone have any suggestions on how
I might go about fixing this?

Thanks
Blaine



__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

------------------------------

Date:    Thu, 27 Jan 2005 14:00:17 -0500
From:    Abe Gillespie <agillesp at VT.EDU>
Subject: Problem with Mapscript + PostGIS

--Apple-Mail-24--303801657
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
        charset=US-ASCII;
        format=flowed

I'm compiling everything on Windows.  MapServer CGI compiles fine with=20=

"mapserv -v" giving:

MapServer version 4.4.1 OUTPUT=3DGIF OUTPUT=3DPNG OUTPUT=3DJPEG =
OUTPUT=3DWBMP=20
SUPPORTS=3DPROJ SUPPORTS=3DFREETYPE SUPPORTS=3DWMS_SERVER INPUT=3DPOSTGIS=20=

INPUT=3DOGR INPUT=3DGDAL INPUT=3DSHAPEFILE DEBUG=3DMSDEBUG=00

I also don't have any problem compiling the C# version of Mapscript. =20
But when I try to access a PostGIS layer the logs tell me I don't have=20=

PostGIS support available.  Here's the error:

Thu Jan 27 13:18:39 2005 - msPOSTGISLayerOpen(): Query error.=20
msPOSTGISLayerOpen called but unimplemented!  (mapserver not compiled=20
with postgis support)
Thu Jan 27 13:18:39 2005 - msDrawMap(): Image handling error. Failed to=20=

draw layer named 'Roads'.

I know C# Mapscript is brand new ... so help however you can.  BTW - is=20=

there a way to do the same as "mapserv -v" in Mapscript?  Something=20
like mapObj::version I'd imagine.

Thanks.
-Abe=

--Apple-Mail-24--303801657
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
        charset=US-ASCII

I'm compiling everything on Windows.  MapServer CGI compiles fine with
"mapserv -v" giving:


MapServer version 4.4.1 OUTPUT=3DGIF OUTPUT=3DPNG OUTPUT=3DJPEG =
OUTPUT=3DWBMP
SUPPORTS=3DPROJ SUPPORTS=3DFREETYPE SUPPORTS=3DWMS_SERVER INPUT=3DPOSTGIS
INPUT=3DOGR INPUT=3DGDAL INPUT=3DSHAPEFILE =
DEBUG=3DMSDEBUG=00<fontfamily><param>LastResort</param>


</fontfamily><fontfamily><param>Lucida Grande</param>I also don't have
any problem compiling the C# version of Mapscript.  But when I try to
access a PostGIS layer the logs tell me I don't have PostGIS support
available.  Here's the error:


Thu Jan 27 13:18:39 2005 - msPOSTGISLayerOpen(): Query error.
msPOSTGISLayerOpen called but unimplemented!  (mapserver not compiled
with postgis support)

Thu Jan 27 13:18:39 2005 - msDrawMap(): Image handling error. Failed
to draw layer named 'Roads'.


I know C# Mapscript is brand new ... so help however you can.  BTW -
is there a way to do the same as "mapserv -v" in Mapscript?  Something
like mapObj::version I'd imagine.


Thanks.

-Abe</fontfamily>=

--Apple-Mail-24--303801657--

------------------------------

Date:    Thu, 27 Jan 2005 11:53:04 -0700
From:    Sean Gillies <sgillies at FRII.COM>
Subject: Re: Problem with Mapscript + PostGIS

On Jan 27, 2005, at 12:00 PM, Abe Gillespie wrote:

> --Apple-Mail-24--303801657
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/plain;
>         charset=US-ASCII;
>         format=flowed
>
> I'm compiling everything on Windows.  MapServer CGI compiles fine
> with=20=
>
> "mapserv -v" giving:
>
> MapServer version 4.4.1 OUTPUT=3DGIF OUTPUT=3DPNG OUTPUT=3DJPEG =
> OUTPUT=3DWBMP=20
> SUPPORTS=3DPROJ SUPPORTS=3DFREETYPE SUPPORTS=3DWMS_SERVER
> INPUT=3DPOSTGIS=20=
>
> INPUT=3DOGR INPUT=3DGDAL INPUT=3DSHAPEFILE DEBUG=3DMSDEBUG=00
>
> I also don't have any problem compiling the C# version of Mapscript.
> =20
> But when I try to access a PostGIS layer the logs tell me I don't
> have=20=
>
> PostGIS support available.  Here's the error:
>
> Thu Jan 27 13:18:39 2005 - msPOSTGISLayerOpen(): Query error.=20
> msPOSTGISLayerOpen called but unimplemented!  (mapserver not
> compiled=20
> with postgis support)
> Thu Jan 27 13:18:39 2005 - msDrawMap(): Image handling error. Failed
> to=20=
>
> draw layer named 'Roads'.
>
> I know C# Mapscript is brand new ... so help however you can.  BTW -
> is=20=
>
> there a way to do the same as "mapserv -v" in Mapscript?  Something=20
> like mapObj::version I'd imagine.
>
> Thanks.
> -Abe=
>

There is mapscript::MS_VERSION, but it is only the version string.  I
like the idea, you should enter it in Bugzilla as a mapscript
enhancement.

Without the benefit of any other information, I guess that you have
some DLL mixup.  Some DLL without libpq is getting in the way.

cheers,
Sean

--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies

------------------------------

Date:    Thu, 27 Jan 2005 13:57:25 -0500
From:    Stephen Woodbridge <woodbri at SWOODBRIDGE.COM>
Subject: Re: shifting .gif colors

Look at http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=306

Blaine Hackett wrote:
> All
>
> I have a mapserver app showing roads, counties, road
> symbols, text, etc.
>
> When I zoom in or out, I get odd looking color
> changes mostly for the symbols.  What is supposed to
> be red might show up as a different color, many times
> dull green or brown, until I zoom in and then it is
> turns red.
>
> I am using .gifs. I imagine it has to do with web safe
> colors but am not sure how to fix it and have found no
> answers on the web. Anyone have any suggestions on how
> I might go about fixing this?
>
> Thanks
> Blaine
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - now with 250MB free storage. Learn more.
> http://info.mail.yahoo.com/mail_250
>

------------------------------

Date:    Thu, 27 Jan 2005 11:00:43 -0800
From:    Jon Saints <saintsjd at YAHOO.COM>
Subject: XUL Interface for mapserver app?

Hi all,

I am currently experimenting with an XUL client
interface for mapserver.  I develop in my free time so
it is coming slowly.  Anyone else out there is working
on somehting simillar?

Thanks
Jon

------------------------------

Date:    Thu, 27 Jan 2005 14:48:44 -0500
From:    Abe Gillespie <agillesp at VT.EDU>
Subject: Re: Problem with Mapscript + PostGIS

You were absolutely right!  The problem was an old libmap.dll.

Thanks as always.
-Abe

On Jan 27, 2005, at 1:53 PM, Sean Gillies wrote:

> On Jan 27, 2005, at 12:00 PM, Abe Gillespie wrote:
>
>> --Apple-Mail-24--303801657
>> Content-Transfer-Encoding: quoted-printable
>> Content-Type: text/plain;
>>         charset=US-ASCII;
>>         format=flowed
>>
>> I'm compiling everything on Windows.  MapServer CGI compiles fine
>> with=20=
>>
>> "mapserv -v" giving:
>>
>> MapServer version 4.4.1 OUTPUT=3DGIF OUTPUT=3DPNG OUTPUT=3DJPEG =
>> OUTPUT=3DWBMP=20
>> SUPPORTS=3DPROJ SUPPORTS=3DFREETYPE SUPPORTS=3DWMS_SERVER
>> INPUT=3DPOSTGIS=20=
>>
>> INPUT=3DOGR INPUT=3DGDAL INPUT=3DSHAPEFILE DEBUG=3DMSDEBUG=00
>>
>> I also don't have any problem compiling the C# version of Mapscript.
>> =20
>> But when I try to access a PostGIS layer the logs tell me I don't
>> have=20=
>>
>> PostGIS support available.  Here's the error:
>>
>> Thu Jan 27 13:18:39 2005 - msPOSTGISLayerOpen(): Query error.=20
>> msPOSTGISLayerOpen called but unimplemented!  (mapserver not
>> compiled=20
>> with postgis support)
>> Thu Jan 27 13:18:39 2005 - msDrawMap(): Image handling error. Failed
>> to=20=
>>
>> draw layer named 'Roads'.
>>
>> I know C# Mapscript is brand new ... so help however you can.  BTW -
>> is=20=
>>
>> there a way to do the same as "mapserv -v" in Mapscript?  Something=20
>> like mapObj::version I'd imagine.
>>
>> Thanks.
>> -Abe=
>>
>
> There is mapscript::MS_VERSION, but it is only the version string.  I
> like the idea, you should enter it in Bugzilla as a mapscript
> enhancement.
>
> Without the benefit of any other information, I guess that you have
> some DLL mixup.  Some DLL without libpq is getting in the way.
>
> cheers,
> Sean
>
> --
> Sean Gillies
> sgillies at frii dot com
> http://users.frii.com/sgillies
>

------------------------------

Date:    Thu, 27 Jan 2005 13:31:16 -0600
From:    Gerry Creager n5jxs <gerry.creager at TAMU.EDU>
Subject: Re: MapInfo and MapServer point location problem

Sounds like a datum error between point data and the underlying map.

What are the EPSG values used?

gerry

John Goecken wrote:
> I have a map in MapInfo with a street layer and a point layer. The point
> location shows up correctly in MapInfo. When I create a site with
> MapServer that uses those layers it moves the point or the line layer. It
> is now showing the point about .06 miles east of the exact location. I
> realize this is a small difference but for the project I'm working on it
> is important. Has anybody ever seen something like this before where
> MapServer moves a point? Thanks.

--
Gerry Creager -- gerry.creager at tamu.edu
Texas Mesonet -- AATLT, Texas A&M University
Cell: 979.229.5301 Office: 979.458.4020
FAX:  979.847.8578 Pager:  979.228.0173
Office: 903A Eller Bldg, TAMU, College Station, TX 77843

------------------------------

Date:    Thu, 27 Jan 2005 13:53:25 -0600
From:    Gerry Creager n5jxs <gerry.creager at TAMU.EDU>
Subject: MySWL bot on the loose

For those with a Windows/MySQL installation, there's an exploit in the
wild affecting these systems.  More info can be found at:
http://isc.sans.org/

Good luck!
gerry
--
Gerry Creager -- gerry.creager at tamu.edu
Texas Mesonet -- AATLT, Texas A&M University
Cell: 979.229.5301 Office: 979.458.4020
FAX:  979.847.8578 Pager:  979.228.0173
Office: 903A Eller Bldg, TAMU, College Station, TX 77843

------------------------------

Date:    Thu, 27 Jan 2005 16:13:20 -0600
From:    Camden Daily <cdaily at GMAIL.COM>
Subject: Transparent pixmaps in Mapserver 4.4.1

I'm having difficulties displaying pngs with transparent backgrounds
as symbols in 4.4.1.  I've read up on the bugs regarding this issue,
and the fix appears to be to add the line "TRANSPARENCY ALPHA" to the
layer containing the transparent symbols.

I draw my layer that contains my symbols using mapscript like this:

// create a temp layer to hold our points
$point_layer = ms_newLayerObj($map);
$point_layer->set("name", "markers");
$point_layer->set("type", MS_LAYER_POINT);
$point_layer->set("status", MS_DEFAULT);
// 1000 is the value used to set transparency to "alpha"
$point_layer->set("transparency", 1000);

// create a class and style for this layer
$point_class = ms_newClassObj($point_layer);
$point_style = ms_newStyleObj($point_class);
$point_symbol = $map->getSymbolByName("house");
$point_style->set("symbol", $point_symbol);
$point_style->set("size", 40);

I had to dig a little to find out that transparency of 1000 = alpha
(maybe need to define MS_ALPHA=1000 in mapscript?).  The layer
displays fine, but the symbol backgrounds aren't transparent.

------------------------------

Date:    Thu, 27 Jan 2005 15:21:41 -0700
From:    Sean Gillies <sgillies at FRII.COM>
Subject: Re: Transparent pixmaps in Mapserver 4.4.1

On Jan 27, 2005, at 3:13 PM, Camden Daily wrote:

> I'm having difficulties displaying pngs with transparent backgrounds
> as symbols in 4.4.1.  I've read up on the bugs regarding this issue,
> and the fix appears to be to add the line "TRANSPARENCY ALPHA" to the
> layer containing the transparent symbols.
>
> I draw my layer that contains my symbols using mapscript like this:
>
> // create a temp layer to hold our points
> $point_layer = ms_newLayerObj($map);
> $point_layer->set("name", "markers");
> $point_layer->set("type", MS_LAYER_POINT);
> $point_layer->set("status", MS_DEFAULT);
> // 1000 is the value used to set transparency to "alpha"
> $point_layer->set("transparency", 1000);
>
> // create a class and style for this layer
> $point_class = ms_newClassObj($point_layer);
> $point_style = ms_newStyleObj($point_class);
> $point_symbol = $map->getSymbolByName("house");
> $point_style->set("symbol", $point_symbol);
> $point_style->set("size", 40);
>
> I had to dig a little to find out that transparency of 1000 = alpha
> (maybe need to define MS_ALPHA=1000 in mapscript?).  The layer
> displays fine, but the symbol backgrounds aren't transparent.
>

Camden, the PHP mapscript maintainers may have overlooked MS_ALPHA.
Let them know through Bugzilla.  At any rate, the alpha transparency is
only needed when you are trying to render a transparent background
symbol onto a 24-bit map (like a JPEG).  It has no positive effect for
8-bit output (such as a GIF).  In that case, you should make sure that
your symbol background is set properly and omit the transparency
directive.

cheers,
Sean

--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies

------------------------------

Date:    Thu, 27 Jan 2005 16:42:18 -0600
From:    Camden Daily <cdaily at GMAIL.COM>
Subject: Re: Transparent pixmaps in Mapserver 4.4.1

Thanks Sean.  I'll make a bugzilla report for the MS_ALPHA value.

The image I'm outputting is a 24bit jpeg.  So I need to get the
'transparency alpha' to work properly.

My symbol definition is

  SYMBOL
    NAME 'house'
    TYPE PIXMAP
    IMAGE 'images/house.png'
    TRANSPARENT 0
  END

Do I need the 'transparent 0' line, if the png file itself has a
transparent background?  Commenting it out doesn't resolve my issue,
but I'm not entirely certain what it's for.

------------------------------

Date:    Thu, 27 Jan 2005 15:53:42 -0700
From:    Sean Gillies <sgillies at FRII.COM>
Subject: Re: Transparent pixmaps in Mapserver 4.4.1

On Jan 27, 2005, at 3:42 PM, Camden Daily wrote:

> Thanks Sean.  I'll make a bugzilla report for the MS_ALPHA value.
>
> The image I'm outputting is a 24bit jpeg.  So I need to get the
> 'transparency alpha' to work properly.
>
> My symbol definition is
>
>   SYMBOL
>     NAME 'house'
>     TYPE PIXMAP
>     IMAGE 'images/house.png'
>     TRANSPARENT 0
>   END
>
> Do I need the 'transparent 0' line, if the png file itself has a
> transparent background?  Commenting it out doesn't resolve my issue,
> but I'm not entirely certain what it's for.
>
>

Take a look at the unit testing data under mapserver-4.4.0/tests.  The
RGB test.png file is the end result of using test.map, symbols.txt,
home.png, and xmarks.png.

Sean


--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies

------------------------------

Date:    Thu, 27 Jan 2005 17:24:33 -0700
From:    Richard Greenwood <richard.greenwood at GMAIL.COM>
Subject: Re: mapfile join

On Wed, 26 Jan 2005 13:01:21 +0200, John Spotten
<John.Spotten at capetown.gov.za> wrote:
>
>
> Hi,
>
> looking for some sample code showing a join use successfully. get a parsing
> error when using it under class.  put it under layer, no parsing error but
> then  XP tells me mapserv.exe has found a problem and is closing down.
> using mapserver 4.4.0 on XP and I get error on html page msDBFJoinConnect():
> Unable to access file. (c:\ms4w\apps\mapserver_demos\ct\data\join.dbf).  any
> clues.    can i use a dbf file.
>
> I am trying to join to a shape file a seperate independent dbf file on a
> common field that is indexed in the shape file.  the field is text type.
>
> I take it it can be accessed using the [join_<join_name>] template in a
> query template file for a one to many join where [join_<join_name>] gets
> replaced with the join header template and footer files and I assume that
> the template within the query template file is
> [<join_name>_<dbf_field_name>].
>
> Is it possible to refer to the qlayer as [join_<join_name>]?
>
> bye
> john
>
> John Spotten
> Transport Modeller/GIS Developer
> Directorate of Transport, Roads and Stormwater
> City of Cape Town
> Tel : +27 21 4067325
> Fax : +27 21 4186989
> Cell : +27 846678901
> Email : john.spotten at capetown.gov.za
> Web : www.capetown.gov.za
>  <<John Spotten.vcf>>
>

I was hoping somebody else would respond to this with a better
example, but here's an sloppy example that I dug out:

LAYER
        NAME  "join_query"
        GROUP "ownership"
        TYPE QUERY
        STATUS ON
        DATA  "/Tc/temp/parcel_region"
        HEADER "attribute_header.html"
        FOOTER "attribute_footer.html"
        TEMPLATE "attribute_display.html"
#       FILTERITEM "PID"
#       FILTER  /./             # regular expression - match anything
        JOIN    # JOIN no longer lives inside of CLASS or inside a QUERY object
                NAME "test"
                TABLE "/Tc/temp/assessor2.DBF"
                FROM PIDP
                TO      PIDA
                TYPE single # multiple
        #       TEMPLATE  cat.html      # required only for one-to-many joins
        END # of JOIN Object
END  # LAYER "join_region"

Yes, you can use a dbf file. In your TABLE clause, try replacing your
"\" with "/" and/or qouting the string.

HTH
--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com

------------------------------

End of MAPSERVER-USERS Digest - 26 Jan 2005 to 27 Jan 2005 (#2005-27)
*********************************************************************

-------------- next part --------------
A non-text attachment was scrubbed...
Name: John Spotten.vcf
Type: text/x-vcard
Size: 226 bytes
Desc: John Spotten.vcf
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050128/fc1f644f/JohnSpotten.vcf


More information about the mapserver-users mailing list