[mapserver-users] Tile Index Issues

Peter Mallen peter.mallen at airborne.aero
Tue Aug 21 16:38:51 PDT 2012


Hello All,

I am new to map server and I am attempting to display polygon shapefiles
using a tile index but have not been able to see any results.
Eventually I would like to use these tiles to place images(raster) files
on my map but I was first just testing the 'TILEINDEX' feature with
vector data.

All of the shapefiles being referenced in my index shapefile are in the
same folder.


Also, in my index shapefile I have the following two shapefiles
referenced under the 'location' column:
\ms4w\Apache\htdocs\map.data\Guatemala_Cities.shp
\ms4w\Apache\htdocs\map.data\Bolivian_Cities.shp

The following page was used as a reference for creating my map file:
http://mapserver.org/utilities/tile4ms.html

Any help on this would be great.

Thank You,

Peter Mallen


-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of
mapserver-users-request at lists.osgeo.org
Sent: Tuesday, August 21, 2012 2:13 PM
To: mapserver-users at lists.osgeo.org
Subject: mapserver-users Digest, Vol 55, Issue 43

Send mapserver-users mailing list submissions to
	mapserver-users at lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.osgeo.org/mailman/listinfo/mapserver-users
or, via email, send a message with subject or body 'help' to
	mapserver-users-request at lists.osgeo.org

You can reach the person managing the list at
	mapserver-users-owner at lists.osgeo.org

When replying, please edit your Subject line so it is more specific than
"Re: Contents of mapserver-users digest..."


Today's Topics:

   1. Re: validation block (Fawcett, David (MPCA))
   2. Re: validation block (Stephen Woodbridge)
   3. how to add a time stamp on raster data (Peisheng Zhao)
   4. Re: how to add a time stamp on raster data (Lime, Steve D (DNR))


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

Message: 1
Date: Tue, 21 Aug 2012 19:28:35 +0000
From: "Fawcett, David (MPCA)" <David.Fawcett at state.mn.us>
To: Stephen Woodbridge <woodbri at swoodbridge.com>,
	"mapserver-users at lists.osgeo.org"
<mapserver-users at lists.osgeo.org>
Subject: Re: [mapserver-users] validation block
Message-ID:
	
<D645DD294B659443AAFDEFBEC8F1E9820CBE26 at 055-CH1MPN1-003.055d.mgd.msft.ne
t>
	
Content-Type: text/plain; charset="iso-8859-1"

I do something like the second example in one of my applications.  I
send the comma-delimited string for use as part of the IN statement.  

This basically allows you to symbolize features from your spatial data
set based on data passed in through the URL.  

I pass these URL vars:
&group1=129,119,041,005,159,051,011,147,097,015,067,171,081,063,025,093,
009,149,079,049,065,003,143,027,039,007,099,121,151,135,107,047,033,031,
023,089,001,013,161,109,139,061,055,101,045,127,113,117,167,085,133,073,
071,157,105,083,165,077,111,059,115,019,153,125,169,087,043,145,017,131,
021,173,035,095,091,155,057,103,075,029,069&group2=137,163,037,141,123&g
roup3=&group4=053

Here is the layer definition:

LAYER
  NAME "airdata"
  STATUS DEFAULT
  DATA 'county_thin'
  TYPE POLYGON
  TEMPLATE "templates/emiss_imap_template.html"

  VALIDATION
     group1 "^[0-9\,]+$"
     group2 "^[0-9\,]+$"
     group3 "^[0-9\,]+$"
     group4 "^[0-9\,]+$"
  END
  CLASS
     NAME "group1"
           EXPRESSION ('[county_fip]' IN '%group1%')
	   STYLE
	       COLOR 241 238 246
	   END
  END
  CLASS
     NAME "group2"
           EXPRESSION ('[county_fip]' IN '%group2%')
	   STYLE
	       COLOR 189 201 225
	   END
  END
  CLASS
     NAME "group3"
           EXPRESSION ('[county_fip]' IN '%group3%')
	   STYLE
	       COLOR 116 169 207
	   END
  END
  CLASS
     NAME "group4"
           EXPRESSION ('[county_fip]' IN '%group4%')
	   STYLE
	       COLOR 5 112 176
	   END
  END

END

David.

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephen
Woodbridge
Sent: Tuesday, August 21, 2012 1:16 PM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] validation block

Typically the SQL syntax is   column in (a,b,c,d)
So based on this

[id_bassin] in '%ID_BASSIN%'

would be problematic I think because your syntax is:

column in 'string'

Which is not valid. Also what is your validation for %ID_BASSIN%?
Is something like this?   ^\([0-9]+(,[0-9]+)*\)$

where ID_BASSIN=(123,234,345)

or do you want something like:

[id_bassin] in (%ID_BASSIN%)

with a valdiation like:  ^[0-9]+(,[0-9]+)*$

where ID_BASSIN=123,234,345

-Steve W

On 8/21/2012 1:33 PM, Marc-Andr? Trottier wrote:
> here is an example of two class in 'adn_station_max_v.map' :
>
> CLASS
>      NAME "Information non disponible (grande ?chelle)"
>      EXPRESSION ( '[etat]' = 'GRIS' AND [id_bassin] in '%ID_BASSIN%')
>      GROUP "BASSIN"
>          MINSCALEDENOM 0
>      MAXSCALEDENOM 150000
>      STYLE
>          SYMBOL 'circle'
>          COLOR 128 128 128
>          OUTLINECOLOR 0 0 0
>          SIZE 9
>      END
>
>      LABEL
>          COLOR           0 0 0
>          OUTLINECOLOR    255 255 255
>          ANTIALIAS       FALSE
>          TYPE            TRUETYPE
>          FONT            "ubuntu"
>          SIZE            14
>          POSITION auto
>          FORCE                     TRUE
>      END
> END
>
> CLASS
>      NAME "Seuil d\'inondation majeure"
>      EXPRESSION ( '[etat]' = 'ROUGE' AND [region_admin_id] in
'%ID_REG%')
>      GROUP "REG_ADMIN"
>      MINSCALEDENOM 110000
>
>      STYLE
>          SYMBOL 'circle'
>          COLOR   255 0 0
>          OUTLINECOLOR 0 0 0
>          SIZE 14
>      END
>
>      LABEL
>          WRAP            "!"
>          ALIGN           CENTER
>          COLOR           0 0 0
>          OUTLINECOLOR    255 255 255
>          ANTIALIAS       FALSE
>          TYPE            TRUETYPE
>          FONT            "ubuntu"
>          SIZE            14
>          FORCE                     TRUE
>          OFFSET          0 12
>      END
> END
>
> if i understant this meant that for a layer, i must validate all 
> variables of all class even if i don't use them all.
> My include of 'adn_station_max_v.map' contains X substitutions in X 
> class so i must have X validations even if i don't use all X class.
>
> In my example, i include many class with 'adn_station_max_v.map' but 
> i'm using only one variable at a time. All class in CLASSGROUP
'REG_ADMIN'
> only use 'ID_REG'.
>
>
> 2012/8/21 Stephen Woodbridge <woodbri at swoodbridge.com 
> <mailto:woodbri at swoodbridge.com>>
>
>     You probably need to quote:
>
>                    'ID_BASSIN' '[[a-zA-Z0-9]{0,10},??]*'
>
>                    "#ID_REG' '[[a-zA-Z0-9]{0,10},??]*'
>
>     And I would be very suspicious that '#ID_REG' is a value
identifier
>     because of the '#' character.
>
>     -Steve W
>
>
>     On 8/21/2012 11:38 AM, Marc-Andr? Trottier wrote:
>
>         there is my layer's definition :
>
>               LAYER
>                   VALIDATION
>                       ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
>                       #ID_REG '[[a-zA-Z0-9]{0,10},??]*'
>                   END
>                   INCLUDE "../layers/bd/adn_station_max___v.map"
>                   CLASSGROUP "BASSIN"
>                   NAME "adn_station_bassin"
>               END
>
>               LAYER
>                   VALIDATION
>                       #ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
>                       ID_REG '[[a-zA-Z0-9]{0,10},??]*'
>                   END
>                   INCLUDE "../layers/bd/adn_station_max___v.map"
>                   CLASSGROUP "REG_ADMIN"
>                   NAME "adn_station_reg_admin"
>               END
>
>         with these commented lines a got this error :
>         msValidateParameter(): Regular expression error. Parameter
pattern
>         validation failed.
>
>         without comment, i got no error.
>
>         CLASSGROUP 'BASSIN' contains many class but each class use
only
>         'ID_BASSIN' and
>         CLASSGROUP 'REG_ADMIN' contains many class but each class use
>         only 'ID_REG'
>
>         is it the right thing to do ? or like i thought, the
validation
>         block
>         can contains only the variable used by the layer ?
>
>
>
>         _________________________________________________
>         mapserver-users mailing list
>         mapserver-users at lists.osgeo.__org
>         <mailto:mapserver-users at lists.osgeo.org>
>         http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
>         <http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>
>
>     _________________________________________________
>     mapserver-users mailing list
>     mapserver-users at lists.osgeo.__org
>     <mailto:mapserver-users at lists.osgeo.org>
>     http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
>     <http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




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

Message: 2
Date: Tue, 21 Aug 2012 16:32:56 -0400
From: Stephen Woodbridge <woodbri at swoodbridge.com>
To: "Fawcett, David (MPCA)" <David.Fawcett at state.mn.us>
Cc: "mapserver-users at lists.osgeo.org"
	<mapserver-users at lists.osgeo.org>
Subject: Re: [mapserver-users] validation block
Message-ID: <5033F078.2060604 at swoodbridge.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi David,

Thank you for the feedback, I have only done this with SQL statements. 
I'm surprised that we implemented this using a different syntax.
Anyway your complete example below will hopefully help others to get it
working also.

Thanks,
   -Steve W

On 8/21/2012 3:28 PM, Fawcett, David (MPCA) wrote:
> I do something like the second example in one of my applications.  I
send the comma-delimited string for use as part of the IN statement.
>
> This basically allows you to symbolize features from your spatial data
set based on data passed in through the URL.
>
> I pass these URL vars:
> &group1=129,119,041,005,159,051,011,147,097,015,067,171,081,063,025,09
> 3,009,149,079,049,065,003,143,027,039,007,099,121,151,135,107,047,033,
> 031,023,089,001,013,161,109,139,061,055,101,045,127,113,117,167,085,13
> 3,073,071,157,105,083,165,077,111,059,115,019,153,125,169,087,043,145,
> 017,131,021,173,035,095,091,155,057,103,075,029,069&group2=137,163,037
> ,141,123&group3=&group4=053
>
> Here is the layer definition:
>
> LAYER
>    NAME "airdata"
>    STATUS DEFAULT
>    DATA 'county_thin'
>    TYPE POLYGON
>    TEMPLATE "templates/emiss_imap_template.html"
>
>    VALIDATION
>       group1 "^[0-9\,]+$"
>       group2 "^[0-9\,]+$"
>       group3 "^[0-9\,]+$"
>       group4 "^[0-9\,]+$"
>    END
>    CLASS
>       NAME "group1"
>             EXPRESSION ('[county_fip]' IN '%group1%')
> 	   STYLE
> 	       COLOR 241 238 246
> 	   END
>    END
>    CLASS
>       NAME "group2"
>             EXPRESSION ('[county_fip]' IN '%group2%')
> 	   STYLE
> 	       COLOR 189 201 225
> 	   END
>    END
>    CLASS
>       NAME "group3"
>             EXPRESSION ('[county_fip]' IN '%group3%')
> 	   STYLE
> 	       COLOR 116 169 207
> 	   END
>    END
>    CLASS
>       NAME "group4"
>             EXPRESSION ('[county_fip]' IN '%group4%')
> 	   STYLE
> 	       COLOR 5 112 176
> 	   END
>    END
>
> END
>
> David.
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org 
> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephen 
> Woodbridge
> Sent: Tuesday, August 21, 2012 1:16 PM
> To: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] validation block
>
> Typically the SQL syntax is   column in (a,b,c,d)
> So based on this
>
> [id_bassin] in '%ID_BASSIN%'
>
> would be problematic I think because your syntax is:
>
> column in 'string'
>
> Which is not valid. Also what is your validation for %ID_BASSIN%?
> Is something like this?   ^\([0-9]+(,[0-9]+)*\)$
>
> where ID_BASSIN=(123,234,345)
>
> or do you want something like:
>
> [id_bassin] in (%ID_BASSIN%)
>
> with a valdiation like:  ^[0-9]+(,[0-9]+)*$
>
> where ID_BASSIN=123,234,345
>
> -Steve W
>
> On 8/21/2012 1:33 PM, Marc-Andr? Trottier wrote:
>> here is an example of two class in 'adn_station_max_v.map' :
>>
>> CLASS
>>       NAME "Information non disponible (grande ?chelle)"
>>       EXPRESSION ( '[etat]' = 'GRIS' AND [id_bassin] in
'%ID_BASSIN%')
>>       GROUP "BASSIN"
>>           MINSCALEDENOM 0
>>       MAXSCALEDENOM 150000
>>       STYLE
>>           SYMBOL 'circle'
>>           COLOR 128 128 128
>>           OUTLINECOLOR 0 0 0
>>           SIZE 9
>>       END
>>
>>       LABEL
>>           COLOR           0 0 0
>>           OUTLINECOLOR    255 255 255
>>           ANTIALIAS       FALSE
>>           TYPE            TRUETYPE
>>           FONT            "ubuntu"
>>           SIZE            14
>>           POSITION auto
>>           FORCE                     TRUE
>>       END
>> END
>>
>> CLASS
>>       NAME "Seuil d\'inondation majeure"
>>       EXPRESSION ( '[etat]' = 'ROUGE' AND [region_admin_id] in
'%ID_REG%')
>>       GROUP "REG_ADMIN"
>>       MINSCALEDENOM 110000
>>
>>       STYLE
>>           SYMBOL 'circle'
>>           COLOR   255 0 0
>>           OUTLINECOLOR 0 0 0
>>           SIZE 14
>>       END
>>
>>       LABEL
>>           WRAP            "!"
>>           ALIGN           CENTER
>>           COLOR           0 0 0
>>           OUTLINECOLOR    255 255 255
>>           ANTIALIAS       FALSE
>>           TYPE            TRUETYPE
>>           FONT            "ubuntu"
>>           SIZE            14
>>           FORCE                     TRUE
>>           OFFSET          0 12
>>       END
>> END
>>
>> if i understant this meant that for a layer, i must validate all 
>> variables of all class even if i don't use them all.
>> My include of 'adn_station_max_v.map' contains X substitutions in X 
>> class so i must have X validations even if i don't use all X class.
>>
>> In my example, i include many class with 'adn_station_max_v.map' but 
>> i'm using only one variable at a time. All class in CLASSGROUP
'REG_ADMIN'
>> only use 'ID_REG'.
>>
>>
>> 2012/8/21 Stephen Woodbridge <woodbri at swoodbridge.com 
>> <mailto:woodbri at swoodbridge.com>>
>>
>>      You probably need to quote:
>>
>>                     'ID_BASSIN' '[[a-zA-Z0-9]{0,10},??]*'
>>
>>                     "#ID_REG' '[[a-zA-Z0-9]{0,10},??]*'
>>
>>      And I would be very suspicious that '#ID_REG' is a value
identifier
>>      because of the '#' character.
>>
>>      -Steve W
>>
>>
>>      On 8/21/2012 11:38 AM, Marc-Andr? Trottier wrote:
>>
>>          there is my layer's definition :
>>
>>                LAYER
>>                    VALIDATION
>>                        ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
>>                        #ID_REG '[[a-zA-Z0-9]{0,10},??]*'
>>                    END
>>                    INCLUDE "../layers/bd/adn_station_max___v.map"
>>                    CLASSGROUP "BASSIN"
>>                    NAME "adn_station_bassin"
>>                END
>>
>>                LAYER
>>                    VALIDATION
>>                        #ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
>>                        ID_REG '[[a-zA-Z0-9]{0,10},??]*'
>>                    END
>>                    INCLUDE "../layers/bd/adn_station_max___v.map"
>>                    CLASSGROUP "REG_ADMIN"
>>                    NAME "adn_station_reg_admin"
>>                END
>>
>>          with these commented lines a got this error :
>>          msValidateParameter(): Regular expression error. Parameter
pattern
>>          validation failed.
>>
>>          without comment, i got no error.
>>
>>          CLASSGROUP 'BASSIN' contains many class but each class use
only
>>          'ID_BASSIN' and
>>          CLASSGROUP 'REG_ADMIN' contains many class but each class
use
>>          only 'ID_REG'
>>
>>          is it the right thing to do ? or like i thought, the
validation
>>          block
>>          can contains only the variable used by the layer ?
>>
>>
>>
>>          _________________________________________________
>>          mapserver-users mailing list
>>          mapserver-users at lists.osgeo.__org
>>          <mailto:mapserver-users at lists.osgeo.org>
>>          http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
>>          <http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>>
>>
>>      _________________________________________________
>>      mapserver-users mailing list
>>      mapserver-users at lists.osgeo.__org
>>      <mailto:mapserver-users at lists.osgeo.org>
>>      http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
>>      <http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>>
>>
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



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

Message: 3
Date: Tue, 21 Aug 2012 20:35:23 +0000
From: Peisheng Zhao <zhaops at hotmail.com>
To: users mapserver <mapserver-users at lists.osgeo.org>
Subject: [mapserver-users] how to add a time stamp on raster data
Message-ID: <BLU002-W19941056D946CD7DDF9EB63D0B80 at phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"


Hi all,

We have a set of time-series data. Is it popossible to add a time stamp,
i.e. the value of time parameter in the request, on raster data? Thanks.

Peisheng
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120821/a
054ab61/attachment-0001.html>

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

Message: 4
Date: Tue, 21 Aug 2012 21:13:10 +0000
From: "Lime, Steve D (DNR)" <Steve.Lime at state.mn.us>
To: Peisheng Zhao <zhaops at hotmail.com>, users mapserver
	<mapserver-users at lists.osgeo.org>
Subject: Re: [mapserver-users] how to add a time stamp on raster data
Message-ID:
	
<C549F0496453D842B4DD71AC8188DDC51F967F at 055-CH1MPN1-042.055d.mgd.msft.ne
t>
	
Content-Type: text/plain; charset="iso-8859-1"

Probably, you'd do it through an annotation layer. What version are you
using? What interface (CGI, WMS, WCS)? Basically the idea would be to
funnel the time parameter into a TEXT expression in the annotation
layer. Layer would look like (assuming a variable called 'time' is
passed) this I think:

LAYER
  NAME 'timestamp'
  TYPE ANNOTATION
  STATUS DEFAULT
  TRANSFORM LL # lower-left corner of the
  FEATURE
    POINTS 10 10 END
  END
  VALIDATION
    'time' 'some expression that matches time values'
  END
  CLASS
    LABEL
      ...
    END
    TEXT '%time%'
  END
END

This would plop the passed time in the lower left corner of the output,
or at least I think it should.

Steve

________________________________
From: mapserver-users-bounces at lists.osgeo.org
[mapserver-users-bounces at lists.osgeo.org] on behalf of Peisheng Zhao
[zhaops at hotmail.com]
Sent: Tuesday, August 21, 2012 3:35 PM
To: users mapserver
Subject: [mapserver-users] how to add a time stamp on raster data


Hi all,

We have a set of time-series data. Is it popossible to add a time stamp,
i.e. the value of time parameter in the request, on raster data? Thanks.

Peisheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120821/9
13868a4/attachment.html>

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

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


End of mapserver-users Digest, Vol 55, Issue 43
***********************************************


More information about the mapserver-users mailing list