GRABBING some default CGI parameters in MapFile.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

GRABBING some default CGI parameters in MapFile.

blammo
All,

Isn’t there some way to grab the width/height parameter values  (%width%) from within the Mapfile.

I tried for width by adding in a validation line:

VALIDATION
'pin' '^[0-9]{12}$'
'qstring' '^[0-9]{12}$'
'width' '^[0-9]{5}$'
END

but I get an error:

[Thu Sep  7 11:05:31 2017].805273 msApplySubstitutions(): Regular expression error. Parameter pattern validation failed.
[Thu Sep  7 11:05:31 2017].805313 layer (Parcels-Query-Edges-Tabulation): failed to validate (width=1389) for regex (^[0-9]{12}$)

. . . .


Thanks

bobb




 
"This telephone has too many shortcomings to be seriously considered as a means of communication. The device is inherently of no value to us."  -- An internal Western Union memo, 1876




_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GRABBING some default CGI parameters in MapFile.

Lime, Steve D (MNIT)
Width in what context? How are you trying use that value?
From: mapserver-users <[hidden email]> on behalf of Basques, Bob (CI-StPaul) <[hidden email]>
Sent: Thursday, September 7, 2017 11:18:04 AM
To: [hidden email]
Subject: [mapserver-users] GRABBING some default CGI parameters in MapFile.
 
All,

Isn’t there some way to grab the width/height parameter values  (%width%) from within the Mapfile.

I tried for width by adding in a validation line:

VALIDATION
'pin' '^[0-9]{12}$'
'qstring' '^[0-9]{12}$'
'width' '^[0-9]{5}$'
END

but I get an error:

[Thu Sep  7 11:05:31 2017].805273 msApplySubstitutions(): Regular expression error. Parameter pattern validation failed.
[Thu Sep  7 11:05:31 2017].805313 layer (Parcels-Query-Edges-Tabulation): failed to validate (width=1389) for regex (^[0-9]{12}$)

. . . .


Thanks

bobb




 
"This telephone has too many shortcomings to be seriously considered as a means of communication. The device is inherently of no value to us."  -- An internal Western Union memo, 1876




_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GRABBING some default CGI parameters in MapFile.

blammo
Figures it would be that simple.  I actually need a variable length number.

I actaully wanted:  ‘width’ ‘^[0-9]+$’      (I guess)

That worked.  Thanks

bobb




On Sep 7, 2017, at 2:17 PM, Lime, Steve D (MNIT) <[hidden email]> wrote:

^[0-9]{12}$ means exactly 12 numbers, hence the error. You probably want something more like ^[0-9]{1,4}$ don’t you? --Steve
 


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GRABBING some default CGI parameters in MapFile.

blammo
In reply to this post by Lime, Steve D (MNIT)
All,

I’ve been wanting to build a HUD display sort of thing like this for quite a while, thankfully a project came along to let me do it.  I think I’ll have a bunch more similar work come in after some other folks see this in operation.  I’m to a point of sitting back and watching it be used now.

Here is an image and screenshot of the final product. All Mapserver, and only Mapserver (oh, and PostGIS too.):

<a href="https://www.dropbox.com/s/x04lsjlpk24n9yk/Screen Shot 2017-09-12 at 9.56.36 AM.png?dl=0" class="">https://www.dropbox.com/s/x04lsjlpk24n9yk/Screen%20Shot%202017-09-12%20at%209.56.36%20AM.png?dl=0


The bottom boxes are actually Labels generated from a SQL ARRAY output from PostGIS.  All relational work for the Parcel Edges to Street/Alley Centerlines also built entirely inside of PostGIS/Postgres.  Worked really well as a matter of fact.  The new Materialized view stuff in Postgres was invaluable. I still have some stuff to do with Condos, some of them are stacked on top of each other which presents some problems, but I think I have that figured out now.

I can send the MAPFILE to anyone interested.  I need to santize it first though.  there were some definte gotchas in this mapfile, namely, the effects of the GEOTRANFORM on other mapfile things needs a bit more documentation I think.


Thanks for the help on this.

bobb

P.S. I had a thought about stacking the Labels along the bottom, but justified to a corner, problem is, they are all variable width/height, if they are cached is there a way to squish them all into a corner along an edge somehow, either vertically or horizontally?  





"It's kind of fun to do the impossible." 
- Walt Disney




_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GRABBING some default CGI parameters in MapFile.

Lime, Steve D (MNIT)

You’re a mad man!

 

From: Basques, Bob (CI-StPaul) [mailto:[hidden email]]
Sent: Tuesday, September 12, 2017 9:58 AM
To: Lime, Steve D (MNIT) <[hidden email]>
Cc: [hidden email]
Subject: Re: GRABBING some default CGI parameters in MapFile.

 

All,

 

I’ve been wanting to build a HUD display sort of thing like this for quite a while, thankfully a project came along to let me do it.  I think I’ll have a bunch more similar work come in after some other folks see this in operation.  I’m to a point of sitting back and watching it be used now.

 

Here is an image and screenshot of the final product. All Mapserver, and only Mapserver (oh, and PostGIS too.):

 

 

 

The bottom boxes are actually Labels generated from a SQL ARRAY output from PostGIS.  All relational work for the Parcel Edges to Street/Alley Centerlines also built entirely inside of PostGIS/Postgres.  Worked really well as a matter of fact.  The new Materialized view stuff in Postgres was invaluable. I still have some stuff to do with Condos, some of them are stacked on top of each other which presents some problems, but I think I have that figured out now.

 

I can send the MAPFILE to anyone interested.  I need to santize it first though.  there were some definte gotchas in this mapfile, namely, the effects of the GEOTRANFORM on other mapfile things needs a bit more documentation I think.

 

 

Thanks for the help on this.

 

bobb

 

P.S. I had a thought about stacking the Labels along the bottom, but justified to a corner, problem is, they are all variable width/height, if they are cached is there a way to squish them all into a corner along an edge somehow, either vertically or horizontally?  

 

 

 

 

 

"It's kind of fun to do the impossible." 

- Walt Disney

 

 

 


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GRABBING some default CGI parameters in MapFile.

blammo
In reply to this post by blammo
All,

Here is the Mapfile and some other sample screenshots: 

Mapfile:
https://www.dropbox.com/s/5rfcm5cmh85wp29/rc_parcels_assessment.02.map?dl=0

Screenshots:
https://www.dropbox.com/s/6k7cglpij46pmr7/Screen%20Shot%202017-09-12%20at%202.32.50%20PM.png?dl=0
https://www.dropbox.com/s/m8ip3tf4154tnb4/Screen%20Shot%202017-09-12%20at%202.33.54%20PM.png?dl=0
https://www.dropbox.com/s/m6hos0nig6etl62/Screen%20Shot%202017-09-12%20at%202.36.43%20PM.png?dl=0

This shows the odd labeling angle:
<a href="https://www.dropbox.com/s/9venwt3vnyhnbo1/Screen Shot 2017-09-12 at 2.27.24 PM.png?dl=0" class="">https://www.dropbox.com/s/9venwt3vnyhnbo1/Screen%20Shot%202017-09-12%20at%202.27.24%20PM.png?dl=0

NOTE: I fixed this angle problem this morning and reposted the MapFile.  It has some comments on the angle problem related to how the differences between how Postgres and Mapsever treat compass headings and measure angles,

bobb




_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GRABBING some default CGI parameters in MapFile.

blammo
In reply to this post by blammo
I just sent an Email to the list that was supposed to look like this one . . . .

All,

Here is the Mapfile and some other sample screenshots: 

Mapfile:
https://www.dropbox.com/s/5rfcm5cmh85wp29/rc_parcels_assessment.02.map?dl=0

Screenshots:
https://www.dropbox.com/s/6k7cglpij46pmr7/Screen%20Shot%202017-09-12%20at%202.32.50%20PM.png?dl=0
<a href="https://www.dropbox.com/s/m8ip3tf4154tnb4/Screen Shot 2017-09-12 at 2.33.54 PM.png?dl=0" class="">https://www.dropbox.com/s/m8ip3tf4154tnb4/Screen%20Shot%202017-09-12%20at%202.33.54%20PM.png?dl=0
<a href="https://www.dropbox.com/s/m6hos0nig6etl62/Screen Shot 2017-09-12 at 2.36.43 PM.png?dl=0" class="">https://www.dropbox.com/s/m6hos0nig6etl62/Screen%20Shot%202017-09-12%20at%202.36.43%20PM.png?dl=0
<a href="https://www.dropbox.com/s/x04lsjlpk24n9yk/Screen Shot 2017-09-12 at 9.56.36 AM.png?dl=0" class="">https://www.dropbox.com/s/x04lsjlpk24n9yk/Screen%20Shot%202017-09-12%20at%209.56.36%20AM.png?dl=0


I updated the Mapfile this morning with some new comments, and found a couple of comment typos that I fixed.  I also figured out the odd angle stuff, which turned out to be differences between how Postgres and Mapserver Treat Angle measurements and what they respectively believe is the “zero” compass angle.  I added some comments to this effect in the Mapfile too.



bobb


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users