Re: [mapserver-users] variable substitution

2017-01-04 Thread Lime, Steve D (MNIT)
I should also add that you should add anchors (^$) to your validation 
expression. Just using "[0-9]" will match "111" but also "111; do something 
nasty in SQL". So "^[0-9]*$" is much better.

Steve


From: Lime, Steve D (MNIT)
Sent: Wednesday, January 04, 2017 9:01 AM
To: Stephen Woodbridge; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] variable substitution

Actually you don't want the []'s around the substitution as they denote a 
column reference. '%adrkey%' or %adrkey% should suffice depending on the type 
of comparison being done. --Steve


From: mapserver-users [mapserver-users-boun...@lists.osgeo.org] on behalf of 
Stephen Woodbridge [wood...@swoodbridge.com]
Sent: Wednesday, January 04, 2017 8:53 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] variable substitution

Or use:
FILTER ( "[gid]" = '[%adrkey%]' )

" for the column name
' for the value

-Steve W

On 1/4/2017 6:47 AM, thomas bonfort wrote:
> yeah, if you want an integer comparison use:
> FILTER ( [gid] = [%adrkey%] )
>
>
> On Wed, Jan 4, 2017 at 12:43 PM Jörg Thomsen (WhereGroup)
> mailto:joerg.thom...@wheregroup.com>> wrote:
>
> Hello Thomas,
>
> Am 04.01.2017 um 12:34 schrieb thomas bonfort:
> > FILTER ( "[gid]" = "[%adrkey%]" )
>
> this doesn't work, ms puts the value into quotes so PG interprets it as
> a column-name.
> > [Wed Jan  4 12:40:04 2017].714496 msPostGISLayerWhichShapes():
> Error (ERROR:  column "2" does not exist
> > LINE 1: select
> "beschriftung","gid","2",encode(ST_AsBinary(ST_Force2...
>
> But the Filteritem / Filter solution is ok.
>
> Viele Grüße,
> Jörg Thomsen
>
> --
>
> *
> FOSS Academy Winterschule 2017
> 20.-24.03.2017 in Bonn
> Alles Wichtige zur Erstellung einer GDI in nur 5 Tagen!
> https://www.foss-academy.com/schulungstermine/kompaktkurs-winterschule
> *
>
> ---
> Jörg Thomsen
> WhereGroup GmbH & Co. KG
> Gillweg 3
> 14193 Berlin
> Germany
>
> Fon: +49 (0)30 / 5130 278 74 
> Fax: +49 (0)30 / 89 09 53 21 
>
> joerg.thom...@wheregroup.com 
> www.wheregroup.com 
> Amtsgericht Bonn, HRA 6788
> ---
> Komplementärin:
> WhereGroup Verwaltungs GmbH
> vertreten durch:
> Olaf Knopp, Peter Stamm
> ---
> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapserver - libs in /usr/local/lib disappear after reboot

2017-01-04 Thread Ian Walberg
Jeff,

Thanks for the info and you were correct, they had not disappeared.

Karma - oops, my apologies.

Regards

Ian

-Original Message-
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Jeff McKenna
Sent: Wednesday, January 4, 2017 11:32 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Mapserver - libs in /usr/local/lib disappear 
after reboot

I haven't seen the libs-physically-disappear case, but I often reboot client 
servers and the libs 'cannot be found' (meaning executing mapserv doesn't 
search for the libs in the proper directory of /usr/local/lib/). 
  In this case the solution is to set the LD_LIBRARY_PATH to that directory for 
your profile (this step changes for different linux
flavors) and then re-run 'sudo ldconfig'.

As a side note, for good karma please refrain from sending your questions to 
multiple mailing lists at the same time.  Thanks,

-jeff



--
Jeff McKenna
MapServer Consulting and Training Services http://www.gatewaygeomatics.com/




On 2017-01-04 2:36 PM, Ian Walberg wrote:
> Folks,
>
> We build and install from source any of the recent versions using cmake.
>
> Then we copy the mapserv binary from /usr/local/bin to /var/www/cgi-bin to 
> use with our apache install.
>
> All is good unless we reboot and the libs in /usr/local/lib are removed, this 
> is a Fedora 19 server.
>
> Anyone know why this happens? What have we done wrong?
>
> Thanks
>
> Ian
>




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapserver - libs in /usr/local/lib disappear after reboot

2017-01-04 Thread Jeff McKenna
I haven't seen the libs-physically-disappear case, but I often reboot 
client servers and the libs 'cannot be found' (meaning executing mapserv 
doesn't search for the libs in the proper directory of /usr/local/lib/). 
 In this case the solution is to set the LD_LIBRARY_PATH to that 
directory for your profile (this step changes for different linux 
flavors) and then re-run 'sudo ldconfig'.


As a side note, for good karma please refrain from sending your 
questions to multiple mailing lists at the same time.  Thanks,


-jeff



--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




On 2017-01-04 2:36 PM, Ian Walberg wrote:

Folks,

We build and install from source any of the recent versions using cmake.

Then we copy the mapserv binary from /usr/local/bin to /var/www/cgi-bin to use 
with our apache install.

All is good unless we reboot and the libs in /usr/local/lib are removed, this 
is a Fedora 19 server.

Anyone know why this happens? What have we done wrong?

Thanks

Ian






___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Mapserver - libs in /usr/local/lib disappear after reboot

2017-01-04 Thread Ian Walberg
Folks,

We build and install from source any of the recent versions using cmake.

Then we copy the mapserv binary from /usr/local/bin to /var/www/cgi-bin to use 
with our apache install.

All is good unless we reboot and the libs in /usr/local/lib are removed, this 
is a Fedora 19 server.

Anyone know why this happens? What have we done wrong?

Thanks

Ian

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapcache - Composite cache problem

2017-01-04 Thread tellett
Hi again and happy new year! I've tried what you suggested and managed to get
the composite layer to work with this setup:


/cache/mapcache/topo2
/cache/mapcache/topo2/{grid}/{z}/{x}/{y}.{ext}



/cache/mapcache/topo2matrikkelsource
   
/cache/mapcache/topo2matrikkelsource/{grid}/{z}/{x}/{y}.{ext}

 

topo2
topo2matrikkelsource


But I was a little bit confused about what you meant with that we could
'shoot ourselves in the foot' if we omit template tags? And also why we
can't reference that cache (I presume you mean 'topo2matrikkel') from other
tilesets?

Cheers

Tom



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Mapcache-Composite-cache-problem-tp5300828p5302008.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] variable substitution

2017-01-04 Thread Lime, Steve D (MNIT)
Actually you don't want the []'s around the substitution as they denote a 
column reference. '%adrkey%' or %adrkey% should suffice depending on the type 
of comparison being done. --Steve


From: mapserver-users [mapserver-users-boun...@lists.osgeo.org] on behalf of 
Stephen Woodbridge [wood...@swoodbridge.com]
Sent: Wednesday, January 04, 2017 8:53 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] variable substitution

Or use:
FILTER ( "[gid]" = '[%adrkey%]' )

" for the column name
' for the value

-Steve W

On 1/4/2017 6:47 AM, thomas bonfort wrote:
> yeah, if you want an integer comparison use:
> FILTER ( [gid] = [%adrkey%] )
>
>
> On Wed, Jan 4, 2017 at 12:43 PM Jörg Thomsen (WhereGroup)
> mailto:joerg.thom...@wheregroup.com>> wrote:
>
> Hello Thomas,
>
> Am 04.01.2017 um 12:34 schrieb thomas bonfort:
> > FILTER ( "[gid]" = "[%adrkey%]" )
>
> this doesn't work, ms puts the value into quotes so PG interprets it as
> a column-name.
> > [Wed Jan  4 12:40:04 2017].714496 msPostGISLayerWhichShapes():
> Error (ERROR:  column "2" does not exist
> > LINE 1: select
> "beschriftung","gid","2",encode(ST_AsBinary(ST_Force2...
>
> But the Filteritem / Filter solution is ok.
>
> Viele Grüße,
> Jörg Thomsen
>
> --
>
> *
> FOSS Academy Winterschule 2017
> 20.-24.03.2017 in Bonn
> Alles Wichtige zur Erstellung einer GDI in nur 5 Tagen!
> https://www.foss-academy.com/schulungstermine/kompaktkurs-winterschule
> *
>
> ---
> Jörg Thomsen
> WhereGroup GmbH & Co. KG
> Gillweg 3
> 14193 Berlin
> Germany
>
> Fon: +49 (0)30 / 5130 278 74 
> Fax: +49 (0)30 / 89 09 53 21 
>
> joerg.thom...@wheregroup.com 
> www.wheregroup.com 
> Amtsgericht Bonn, HRA 6788
> ---
> Komplementärin:
> WhereGroup Verwaltungs GmbH
> vertreten durch:
> Olaf Knopp, Peter Stamm
> ---
> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] variable substitution

2017-01-04 Thread Stephen Woodbridge

Or use:
FILTER ( "[gid]" = '[%adrkey%]' )

" for the column name
' for the value

-Steve W

On 1/4/2017 6:47 AM, thomas bonfort wrote:

yeah, if you want an integer comparison use:
FILTER ( [gid] = [%adrkey%] )


On Wed, Jan 4, 2017 at 12:43 PM Jörg Thomsen (WhereGroup)
mailto:joerg.thom...@wheregroup.com>> wrote:

Hello Thomas,

Am 04.01.2017 um 12:34 schrieb thomas bonfort:
> FILTER ( "[gid]" = "[%adrkey%]" )

this doesn't work, ms puts the value into quotes so PG interprets it as
a column-name.
> [Wed Jan  4 12:40:04 2017].714496 msPostGISLayerWhichShapes():
Error (ERROR:  column "2" does not exist
> LINE 1: select
"beschriftung","gid","2",encode(ST_AsBinary(ST_Force2...

But the Filteritem / Filter solution is ok.

Viele Grüße,
Jörg Thomsen

--

*
FOSS Academy Winterschule 2017
20.-24.03.2017 in Bonn
Alles Wichtige zur Erstellung einer GDI in nur 5 Tagen!
https://www.foss-academy.com/schulungstermine/kompaktkurs-winterschule
*

---
Jörg Thomsen
WhereGroup GmbH & Co. KG
Gillweg 3
14193 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74 
Fax: +49 (0)30 / 89 09 53 21 

joerg.thom...@wheregroup.com 
www.wheregroup.com 
Amtsgericht Bonn, HRA 6788
---
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
---
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org 
http://lists.osgeo.org/mailman/listinfo/mapserver-users



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Mapserver data point on map

2017-01-04 Thread newmapserver
Hello and happy new year ! 
Currently, I place points (lat / lon) on a map using a mysql query. At each
point is associated an image according to the type of places considered.

Today, I would like to retrieve my information either thanks to Mysql but
thanks to an API. I use the function "addPoints" to adding features to a
layer : 

*A part of script : *
$point = ms_newPointObj();
$line = ms_newLineObj();

$shape = 
ms_newShapeObj(MS_SHAPE_POINT);

$point->setXY( 
$lieu->longitude_metre, $lieu->latitude_metre); 
 
$line->add($point);



$shape->add($line);
$shape->set("text","ici");

$class = 
ms_newClassObj($layerprevision);
$class->setExpression("rot");
$style = ms_newStyleObj($class);
$style->color->setRGB(255, 0, 
0);   


$layerprevision->addFeature($shape);

I'm trying to set a simple "text" on each point but...nothing is displayed. 

Do you have an idea to solve this problem?
Thank you in advance !



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Mapserver-data-point-on-map-tp5301975.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] variable substitution

2017-01-04 Thread thomas bonfort
yeah, if you want an integer comparison use:
FILTER ( [gid] = [%adrkey%] )


On Wed, Jan 4, 2017 at 12:43 PM Jörg Thomsen (WhereGroup) <
joerg.thom...@wheregroup.com> wrote:

> Hello Thomas,
>
> Am 04.01.2017 um 12:34 schrieb thomas bonfort:
> > FILTER ( "[gid]" = "[%adrkey%]" )
>
> this doesn't work, ms puts the value into quotes so PG interprets it as
> a column-name.
> > [Wed Jan  4 12:40:04 2017].714496 msPostGISLayerWhichShapes(): Error
> (ERROR:  column "2" does not exist
> > LINE 1: select "beschriftung","gid","2",encode(ST_AsBinary(ST_Force2...
>
> But the Filteritem / Filter solution is ok.
>
> Viele Grüße,
> Jörg Thomsen
>
> --
>
> *
> FOSS Academy Winterschule 2017
> 20.-24.03.2017 in Bonn
> Alles Wichtige zur Erstellung einer GDI in nur 5 Tagen!
> https://www.foss-academy.com/schulungstermine/kompaktkurs-winterschule
> *
>
> ---
> Jörg Thomsen
> WhereGroup GmbH & Co. KG
> Gillweg 3
> 14193 Berlin
> Germany
>
> Fon: +49 (0)30 / 5130 278 74 <+49%2030%20513027874>
> Fax: +49 (0)30 / 89 09 53 21 <+49%2030%2089095321>
>
> joerg.thom...@wheregroup.com
> www.wheregroup.com
> Amtsgericht Bonn, HRA 6788
> ---
> Komplementärin:
> WhereGroup Verwaltungs GmbH
> vertreten durch:
> Olaf Knopp, Peter Stamm
> ---
> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] variable substitution

2017-01-04 Thread WhereGroup
Hello Thomas,

Am 04.01.2017 um 12:34 schrieb thomas bonfort:
> FILTER ( "[gid]" = "[%adrkey%]" )

this doesn't work, ms puts the value into quotes so PG interprets it as
a column-name.
> [Wed Jan  4 12:40:04 2017].714496 msPostGISLayerWhichShapes(): Error (ERROR:  
> column "2" does not exist
> LINE 1: select "beschriftung","gid","2",encode(ST_AsBinary(ST_Force2...

But the Filteritem / Filter solution is ok.

Viele Grüße,
Jörg Thomsen

-- 

*
FOSS Academy Winterschule 2017
20.-24.03.2017 in Bonn
Alles Wichtige zur Erstellung einer GDI in nur 5 Tagen!
https://www.foss-academy.com/schulungstermine/kompaktkurs-winterschule
*

---
Jörg Thomsen
WhereGroup GmbH & Co. KG
Gillweg 3
14193 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 89 09 53 21

joerg.thom...@wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
---
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
---
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] variable substitution

2017-01-04 Thread thomas bonfort
If you're using mapserver, your syntax and the docs probably need to be
updated. Try:

FILTER ( "[gid]" = "[%adrkey%]" )

please submit a PR to the docs if that solved the issue.
--
thomas


On Wed, Jan 4, 2017 at 12:27 PM Jörg Thomsen (WhereGroup) <
joerg.thom...@wheregroup.com> wrote:

> Hello and a happy new year!
>
> I have had some problems with variable subst. and the FILTER keyword,
> following the example from http://mapserver.org/cgi/runsub.html#filters
> I first tried
>
> >   VALIDATION
> >   'adrkey' '[0-9]'
> >   END
> >
> >   FILTER ('gid=%adrkey%')
>
> but this doesn't work, mapserver seems not to put the filteritem into
> the sql-request:
> > [Wed Jan  4 11:36:24 2017].762361 msPostGISLayerWhichShapes(): Error
> (ERROR:  syntax error at or near "="
> > LINE 1: ...019,28.511788558 5808847.26502019))',25833) and ( = '1')
>
> then I had a look at expression-page
> (http://mapserver.org/mapfile/expressions.html) and tried
>
> > FILTERITEM 'gid'
> > FILTER '%adrkey%'
> which works.
>
> is there any mistake in my first try or doesn't this work anymore an the
> doc on http://mapserver.org/cgi/runsub.html#filters  should be updated?
>
> Regards, Jörg
>
> --
>
> *
> FOSS Academy Winterschule 2017
> 20.-24.03.2017 in Bonn
> Alles Wichtige zur Erstellung einer GDI in nur 5 Tagen!
> https://www.foss-academy.com/schulungstermine/kompaktkurs-winterschule
> *
>
> ---
> Jörg Thomsen
> WhereGroup GmbH & Co. KG
> Gillweg 3
> 14193 Berlin
> Germany
>
> Fon: +49 (0)30 / 5130 278 74 <+49%2030%20513027874>
> Fax: +49 (0)30 / 89 09 53 21 <+49%2030%2089095321>
>
> joerg.thom...@wheregroup.com
> www.wheregroup.com
> Amtsgericht Bonn, HRA 6788
> ---
> Komplementärin:
> WhereGroup Verwaltungs GmbH
> vertreten durch:
> Olaf Knopp, Peter Stamm
> ---
> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] variable substitution

2017-01-04 Thread WhereGroup
Hello and a happy new year!

I have had some problems with variable subst. and the FILTER keyword,
following the example from http://mapserver.org/cgi/runsub.html#filters
I first tried

>   VALIDATION
>   'adrkey' '[0-9]'
>   END
> 
>   FILTER ('gid=%adrkey%')

but this doesn't work, mapserver seems not to put the filteritem into
the sql-request:
> [Wed Jan  4 11:36:24 2017].762361 msPostGISLayerWhichShapes(): Error (ERROR:  
> syntax error at or near "="
> LINE 1: ...019,28.511788558 5808847.26502019))',25833) and ( = '1')

then I had a look at expression-page
(http://mapserver.org/mapfile/expressions.html) and tried

> FILTERITEM 'gid'
> FILTER '%adrkey%'
which works.

is there any mistake in my first try or doesn't this work anymore an the
doc on http://mapserver.org/cgi/runsub.html#filters  should be updated?

Regards, Jörg

-- 

*
FOSS Academy Winterschule 2017
20.-24.03.2017 in Bonn
Alles Wichtige zur Erstellung einer GDI in nur 5 Tagen!
https://www.foss-academy.com/schulungstermine/kompaktkurs-winterschule
*

---
Jörg Thomsen
WhereGroup GmbH & Co. KG
Gillweg 3
14193 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 89 09 53 21

joerg.thom...@wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
---
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
---
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users