[MapServer-users] Mapscript php threaded/unthreaded under Ubuntu

2024-10-10 Thread Jan Hartmann via MapServer-users
Hi,

I upgraded my Ubuntu server to the latest versions of Apache and PHP, using the 
standard apt versions. Then I downloaded MapServer 8.2.2, and 
compiled/installed it. Everything works fine, except for PHP-Mapscript. On 
startup PHP gives this warning:

PHP Warning: PHP Startup: mapscript: Unable to initialize module
Module compiled with build ID=API20230831,TS
PHP compiled with build ID=API20230831, NTS
These options need to match

This means that Mapscript has been compiled thread-safe, and Ubuntu’s PHP has 
been installed non-thread-safe. Phpinfo() gives “thread safety disabled”. 
Apache itself is non-threaded (prefork).

How do I solve this? Is there a non-thread-safe option for Mapscript? Or 
alternatively, should I reinstall a thread-safe version of PHP and/or Apache? 
Or can this be changed in the running version?

Jan
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[MapServer-users] mapscript php using php as apache module

2024-09-26 Thread Jan Hartmann via MapServer-users

Hi,

I have always used mapscript php using the cgi-version of php. I 
remember long ago that using php as an apache module was not thread 
safe. Is that still the case? And if so, what could go wrong using the 
apache module? I am using mapserver 8.0.1


Jan
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] CGI variable "map" fails to validate

2024-03-06 Thread Jan Hartmann via MapServer-users

Shouldn't it be ".*' ?

On 06/03/2024 23:29, Lernout, Matthew via MapServer-users wrote:

So, still banging my head against this a month later after eliminating HTTPS as 
the bogeyman.

Using FastCGI and MapServer with the simplest config and what should be an "allow 
everything" test expression:

CONFIG
   ENV
MS_MAP_PATTERN "."
   END
END

And all requests return:
msLoadMap(): Regular expression error. Filename validation failed.

BONUS: If I strip out the map variable from my request, I'd expect the error "CGI variable "map" is not 
set." but I still get "msLoadMap(): Regular expression error. Filename validation failed." even without 
providing a map! This is following IISRESET, and I know the config is being loaded (if I remove it, I get 
"msLoadConfig(): Unable to access file")

If I'm not supplying a map parameter in my request and it's not throwing an 
error that it's missing, what is being used for map value against the 
expression? (And how do I get it to read my variable in the request?)

Thanks for any direction,
Matt

-Original Message-
From: MapServer-users  On Behalf Of 
Lernout, Matthew via MapServer-users
Sent: Wednesday, February 7, 2024 3:32 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [MapServer-users] CGI variable "map" fails to validate

Hi,

After scratching my head for a while, realized all my testing was over HTTPS. 
Made a localhost connection over HTTP and the map variable was then valid.
I was looking in the wrong place - the error reports a failed validation, but 
that's due to failed certificate trust from what I can see.
Thanks for helping me steer into the real issue - I now have a direction to 
move in!

Matt

-Original Message-
From: Rahkonen Jukka 
Sent: Wednesday, February 7, 2024 1:05 PM
To: Lernout, Matthew ; mapserver-users@lists.osgeo.org
Subject: Re: [MapServer-users] CGI variable "map" fails to validate

[You don't often get email from jukka.rahko...@maanmittauslaitos.fi. Learn why 
this is important at https://aka.ms/LearnAboutSenderIdentification ]

Hi,

"." works for me.

I have a Windows env set first as
set MAPSERVER_CONFIG_FILE=\ms4w\ms4w.conf
These are the meaningful lines in the "ms4w.conf" file.
CONFIG
   ENV
MS_MAP_PATTERN "."
   END
END

Test proves that validation is successful

http://localhost:8060/cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map
msLoadMap(): Unable to access file. (f:\IMS_Maps\Client\projectarea.map)

-Jukka Rahkonen-


-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Lernout, Matthew via MapServer-users
Lähetetty: keskiviikko 7. helmikuuta 2024 19.01
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] CGI variable "map" fails to validate

I've ensured I am restarting the mapserv process with each config change - a 
quick test of commenting out the MS_MAP_PATTERN variable confirmed that is 
enough to refresh the config via error.

Here's a snippet of a sample request. It works with my running instance of 
Mapserver 7.6.2 but doesn't pass validation (pattern '.') in MapServer 8.0.1.

/cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map

Matt

-Original Message-
From: Seth G 
Sent: Wednesday, February 7, 2024 11:48 AM
To: Lernout, Matthew ; MapServer Users 

Subject: Re: [MapServer-users] CGI variable "map" fails to validate

[You don't often get email from se...@geographika.co.uk. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

Hi Matthew,

The CONFIG file I think is only reloaded when IIS or the Application Pool is 
restarted, so some changes to the regex may have been ignored.
Do you have a sample request with the &map= parameter? Is there anything in a 
web.config file that could be stripping these out or modifying them?

Seth

--
web:https://geographika.net/ & https://mapserverstudio.net/
twitter: @geographika

On Wed, Feb 7, 2024, at 5:33 PM, Lernout, Matthew via MapServer-users wrote:

MS_MAP_PATTERN '.' also results in the same failed validation error,
which is what makes me think the issue may be with another config
setting. '.' should match any input, right?

Just to make sure my config file was being loaded, I commented out the
MS_MAP_PATTERN entry entirely, and got the error "msCGILoadMap(): Web
application error. Required configuration value MS_MAP_PATTERN not set."

Matt

-Original Message-
From: MapServer-users  On
Behalf Of Jörg Thomsen (WhereGroup) via MapServer-users
Sent: Wednesday, February 7, 2024 3:24 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [MapServer-users] CGI variable "map" fails to validate

[You don't often get email from mapserver-users@lists.osgeo.org. Learn
why this is important at https://aka.ms/LearnAboutSenderIdentification
]

Hi,

I'm not sure whether the pattern is correct. Shouldn't ist start with ^?

Have yout tried
MS_MAP_PATTERN '.'? (not for production, just as a test)

Jörg

Am 06.02.24 um 20:12 schrieb Lernout, Matthew via MapSer

Re: [MapServer-users] multiple shapepaths

2023-12-13 Thread Jan Hartmann via MapServer-users
No, this is too complex. And Steve's runtime-substutions with %path% in 
de URL probably does not work. I don't see how that could be done in 
PHP-MapScript.


On 06/12/2023 21:23, Rahkonen Jukka wrote:


Hi,

Or write the DATA with full-path into an INCLUDE file if there are 
loads of mapfiles using the same paths. Then there would be much less 
editing when the paths change.


-Jukka Rahkonen-

*Lähettäjä:* MapServer-users  
*Puolesta *Lime, Steve D (MNIT) via MapServer-users

*Lähetetty:* keskiviikko 6. joulukuuta 2023 21.59
*Vastaanottaja:* j.l.h.hartm...@gmail.com; Steve Lime 
*Kopio:* mapserver-users@lists.osgeo.org
*Aihe:* Re: [MapServer-users] multiple shapepaths

IMHO, if you do a SHAPEPATH at the layer level then you might as well 
just add the full-path to the DATA element. You’re not really gaining 
anything with the additional complexity. Did the idea of using runtime 
variables not pan out?


*From:*MapServer-users  *On 
Behalf Of *Jan Hartmann via MapServer-users

*Sent:* Wednesday, December 6, 2023 1:14 AM
*To:* Steve Lime 
*Cc:* mapserver-users@lists.osgeo.org
*Subject:* Re: [MapServer-users] multiple shapepaths

How about a shapepath at the layer level? I am combining 20 years of 
working with old maps in three (or four :-)) different countries 
(Netherlands, Germany and Flemish and Walloon Belgium), all in their 
own formats, projections, directories an servers. It would help to 
keep my applications (and my mind) clear if I could use the 
appropriate shapepaths. And as to portability, it is essential to use 
relative paths. Just try to move a website to a new server with a 
differently named filesystem, if all paths are hard coded.


Jan

Op 5 dec 2023 om 15:43 heeft Steve Lime  het
volgende geschreven:



It won’t work. A configuration is loaded in entirety first, and
then applied as necessary.

On Tue, Dec 5, 2023 at 7:21 AM Jan Hartmann via MapServer-users
 wrote:

Not sure. I cannot get it working anyway. Any ideas, Steve?

On 04/12/2023 10:10, Jörg Thomsen (WhereGroup) via
MapServer-users wrote:
> Hi,
>
> I am not sure, but perhaps overwriting it, would work?
>
> MAP
>
>   shapepath 'blah'
>
>   Layer 1
>   Layer 2
>
>   shapepath 'blubb'
>
>   Layer 3
>   Layer 4
>
    > Jörg
>
>
>
> Am 02.12.23 um 19:32 schrieb Jan Hartmann via MapServer-users:
>> Yes, that is what I sought, didn't know it was possible.
Thanks!
>>
>> Jan
>>
>> On 02/12/2023 19:29, Steve Lime wrote:
>>> One other thought, you can use multiple paths via runtime
subs to
>>> approximate what I think you’re looking for, so:
>>>
>>> WEB
>>>   VALIDATION
>>>     path1_default “/opt/path1”
>>>     path1 “^\/opt\/path1$”
>>>   path2_default “/opt/path2”
>>>   path2 “^\/opt\/path2$”
>>>   END
>>> END
>>>
>>> Then in DATA values you’d use %path1% or %path2%. This is
another
>>> use case for variables that was suggested recently. We could,
>>> perhaps, define a way to mark something as immutable via
url so the
>>> regex could be simplified and only the default would ever
be used
    >>> (e.g. “path2” “immutable”).
>>>
>>> —Steve
>>>
>>> On Fri, Dec 1, 2023 at 11:28 PM Steve Lime
 wrote:
>>>
>>>     Nope, just the one value.
>>>
>>>     On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via
MapServer-users
>>>      wrote:
>>>
>>>     Hi,
>>>
>>>     Is it possible to use multiple paths in a shapepath?
>>>     ./data1:./data2
>>>     does not work
>>>
>>>     Jan
>>> ___
>>>     MapServer-users mailing list
>>> MapServer-users@lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>>
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>

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

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


Re: [MapServer-users] multiple shapepaths

2023-12-06 Thread Jan Hartmann via MapServer-users
Yes, setting a runtime variable is equivalent to an adaptable shapepath. I hadn’t realised that they could be set in thr MapFile. Can they be set in PHP Mapscript as:$oMap->web->validation->path1 = ; ?Op 6 dec 2023 om 20:59 heeft Lime, Steve D (MNIT)  het volgende geschreven:







IMHO, if you do a SHAPEPATH at the layer level then you might as well just add the full-path to the DATA element. You’re not really gaining anything with the additional complexity. Did the idea of using runtime variables not pan out?
 


From: MapServer-users 
On Behalf Of Jan Hartmann via MapServer-users
Sent: Wednesday, December 6, 2023 1:14 AM
To: Steve Lime 
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [MapServer-users] multiple shapepaths


 


How about a shapepath at the layer level? I am combining 20 years of working with old maps in three (or four :-)) different countries (Netherlands, Germany and Flemish and Walloon Belgium), all in their own formats, projections, directories
 an servers. It would help to keep my applications (and my mind) clear if I could use the appropriate shapepaths. And as to portability, it is essential to use relative paths. Just try to move a website to a new server with a differently named filesystem, if
 all paths are hard coded.


 


Jan






Op 5 dec 2023 om 15:43 heeft Steve Lime <sdl...@gmail.com> het volgende geschreven:




 

It won’t work. A configuration is loaded in entirety first, and then applied as necessary.


 


On Tue, Dec 5, 2023 at 7:21 AM Jan Hartmann via MapServer-users <mapserver-users@lists.osgeo.org> wrote:


Not sure. I cannot get it working anyway. Any ideas, Steve?

On 04/12/2023 10:10, Jörg Thomsen (WhereGroup) via MapServer-users wrote:
> Hi,
>
> I am not sure, but perhaps overwriting it, would work?
>
> MAP
>
>   shapepath 'blah'
>
>   Layer 1
>   Layer 2
>
>   shapepath 'blubb'
>
>   Layer 3
>   Layer 4
>
> Jörg
>
>
>
> Am 02.12.23 um 19:32 schrieb Jan Hartmann via MapServer-users:
>> Yes, that is what I sought, didn't know it was possible. Thanks!
>>
>> Jan
>>
>> On 02/12/2023 19:29, Steve Lime wrote:
>>> One other thought, you can use multiple paths via runtime subs to 
>>> approximate what I think you’re looking for, so:
>>>
>>> WEB
>>>   VALIDATION
>>>     path1_default “/opt/path1”
>>>     path1 “^\/opt\/path1$”
>>>   path2_default “/opt/path2”
>>>   path2 “^\/opt\/path2$”
>>>   END
>>> END
>>>
>>> Then in DATA values you’d use %path1% or %path2%. This is another 
>>> use case for variables that was suggested recently. We could, 
>>> perhaps, define a way to mark something as immutable via url so the 
>>> regex could be simplified and only the default would ever be used 
>>> (e.g. “path2” “immutable”).
>>>
>>> —Steve
>>>
>>> On Fri, Dec 1, 2023 at 11:28 PM Steve Lime <sdl...@gmail.com> wrote:
>>>
>>>     Nope, just the one value.
>>>
>>>     On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users
>>>     <mapserver-users@lists.osgeo.org> wrote:
>>>
>>>     Hi,
>>>
>>>     Is it possible to use multiple paths in a shapepath?
>>>     ./data1:./data2
>>>     does not work
>>>
>>>     Jan
>>>     ___
>>>     MapServer-users mailing list
>>>     MapServer-users@lists.osgeo.org
>>> 
https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>>
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> 
https://lists.osgeo.org/mailman/listinfo/mapserver-users
>

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









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


Re: [MapServer-users] multiple shapepaths

2023-12-06 Thread Jan Hartmann via MapServer-users
No, this would make the file system on my server an even worse spaghetti 
mess than when I move the files physically under one root. I want to 
leave everything as distributed as possible.


Cheers, Rich, Steve and all,

Jan

On 06/12/2023 14:21, Richard Greenwood wrote:

How about just symlink in the file system?

On Wed, Dec 6, 2023 at 12:14 AM Jan Hartmann via MapServer-users 
 wrote:


How about a shapepath at the layer level? I am combining 20 years
of working with old maps in three (or four :-)) different
countries (Netherlands, Germany and Flemish and Walloon Belgium),
all in their own formats, projections, directories an servers. It
would help to keep my applications (and my mind) clear if I could
use the appropriate shapepaths. And as to portability, it is
essential to use relative paths. Just try to move a website to a
new server with a differently named filesystem, if all paths are
hard coded.

Jan


Op 5 dec 2023 om 15:43 heeft Steve Lime  het
volgende geschreven:


It won’t work. A configuration is loaded in entirety first, and
then applied as necessary.

On Tue, Dec 5, 2023 at 7:21 AM Jan Hartmann via MapServer-users
 wrote:

Not sure. I cannot get it working anyway. Any ideas, Steve?

On 04/12/2023 10:10, Jörg Thomsen (WhereGroup) via
MapServer-users wrote:
> Hi,
>
> I am not sure, but perhaps overwriting it, would work?
>
> MAP
>
>   shapepath 'blah'
>
>   Layer 1
>   Layer 2
>
>   shapepath 'blubb'
>
>   Layer 3
>   Layer 4
>
> Jörg
    >
>
>
> Am 02.12.23 um 19:32 schrieb Jan Hartmann via MapServer-users:
>> Yes, that is what I sought, didn't know it was possible.
Thanks!
>>
>> Jan
>>
>> On 02/12/2023 19:29, Steve Lime wrote:
>>> One other thought, you can use multiple paths via runtime
subs to
>>> approximate what I think you’re looking for, so:
>>>
>>> WEB
>>>   VALIDATION
>>>     path1_default “/opt/path1”
>>>     path1 “^\/opt\/path1$”
>>>   path2_default “/opt/path2”
>>>   path2 “^\/opt\/path2$”
>>>   END
>>> END
>>>
>>> Then in DATA values you’d use %path1% or %path2%. This is
another
>>> use case for variables that was suggested recently. We
could,
>>> perhaps, define a way to mark something as immutable via
url so the
>>> regex could be simplified and only the default would ever
be used
    >>> (e.g. “path2” “immutable”).
>>>
>>> —Steve
>>>
>>> On Fri, Dec 1, 2023 at 11:28 PM Steve Lime
 wrote:
>>>
>>>     Nope, just the one value.
>>>
>>>     On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via
MapServer-users
>>>      wrote:
>>>
>>>     Hi,
>>>
>>>     Is it possible to use multiple paths in a shapepath?
>>>     ./data1:./data2
>>>     does not work
>>>
>>>     Jan
>>> ___
>>>     MapServer-users mailing list
>>> MapServer-users@lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>>
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>

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


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



--
Richard W. Greenwood
www.greenwoodmap.com <http://www.greenwoodmap.com>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] multiple shapepaths

2023-12-05 Thread Jan Hartmann via MapServer-users
How about a shapepath at the layer level? I am combining 20 years of working with old maps in three (or four :-)) different countries (Netherlands, Germany and Flemish and Walloon Belgium), all in their own formats, projections, directories an servers. It would help to keep my applications (and my mind) clear if I could use the appropriate shapepaths. And as to portability, it is essential to use relative paths. Just try to move a website to a new server with a differently named filesystem, if all paths are hard coded.JanOp 5 dec 2023 om 15:43 heeft Steve Lime  het volgende geschreven:It won’t work. A configuration is loaded in entirety first, and then applied as necessary.On Tue, Dec 5, 2023 at 7:21 AM Jan Hartmann via MapServer-users <mapserver-users@lists.osgeo.org> wrote:Not sure. I cannot get it working anyway. Any ideas, Steve?

On 04/12/2023 10:10, Jörg Thomsen (WhereGroup) via MapServer-users wrote:
> Hi,
>
> I am not sure, but perhaps overwriting it, would work?
>
> MAP
>
>   shapepath 'blah'
>
>   Layer 1
>   Layer 2
>
>   shapepath 'blubb'
>
>   Layer 3
>   Layer 4
>
> Jörg
>
>
>
> Am 02.12.23 um 19:32 schrieb Jan Hartmann via MapServer-users:
>> Yes, that is what I sought, didn't know it was possible. Thanks!
>>
>> Jan
>>
>> On 02/12/2023 19:29, Steve Lime wrote:
>>> One other thought, you can use multiple paths via runtime subs to 
>>> approximate what I think you’re looking for, so:
>>>
>>> WEB
>>>   VALIDATION
>>>     path1_default “/opt/path1”
>>>     path1 “^\/opt\/path1$”
>>>   path2_default “/opt/path2”
>>>   path2 “^\/opt\/path2$”
>>>   END
>>> END
>>>
>>> Then in DATA values you’d use %path1% or %path2%. This is another 
>>> use case for variables that was suggested recently. We could, 
>>> perhaps, define a way to mark something as immutable via url so the 
>>> regex could be simplified and only the default would ever be used 
>>> (e.g. “path2” “immutable”).
>>>
>>> —Steve
>>>
>>> On Fri, Dec 1, 2023 at 11:28 PM Steve Lime <sdl...@gmail.com> wrote:
>>>
>>>     Nope, just the one value.
>>>
>>>     On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users
>>>     <mapserver-users@lists.osgeo.org> wrote:
>>>
>>>     Hi,
>>>
>>>     Is it possible to use multiple paths in a shapepath?
>>>     ./data1:./data2
>>>     does not work
>>>
>>>     Jan
>>>     ___
>>>     MapServer-users mailing list
>>>     MapServer-users@lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>>
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>

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

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


Re: [MapServer-users] multiple shapepaths

2023-12-05 Thread Jan Hartmann via MapServer-users

Not sure. I cannot get it working anyway. Any ideas, Steve?

On 04/12/2023 10:10, Jörg Thomsen (WhereGroup) via MapServer-users wrote:

Hi,

I am not sure, but perhaps overwriting it, would work?

MAP

  shapepath 'blah'

  Layer 1
  Layer 2

  shapepath 'blubb'

  Layer 3
  Layer 4

Jörg



Am 02.12.23 um 19:32 schrieb Jan Hartmann via MapServer-users:

Yes, that is what I sought, didn't know it was possible. Thanks!

Jan

On 02/12/2023 19:29, Steve Lime wrote:
One other thought, you can use multiple paths via runtime subs to 
approximate what I think you’re looking for, so:


WEB
  VALIDATION
    path1_default “/opt/path1”
    path1 “^\/opt\/path1$”
  path2_default “/opt/path2”
  path2 “^\/opt\/path2$”
  END
END

Then in DATA values you’d use %path1% or %path2%. This is another 
use case for variables that was suggested recently. We could, 
perhaps, define a way to mark something as immutable via url so the 
regex could be simplified and only the default would ever be used 
(e.g. “path2” “immutable”).


—Steve

On Fri, Dec 1, 2023 at 11:28 PM Steve Lime  wrote:

    Nope, just the one value.

    On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users
     wrote:

    Hi,

    Is it possible to use multiple paths in a shapepath?
    ./data1:./data2
    does not work

    Jan
    ___
    MapServer-users mailing list
    MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users




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




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


Re: [MapServer-users] multiple shapepaths

2023-12-02 Thread Jan Hartmann via MapServer-users

Yes, that is what I sought, didn't know it was possible. Thanks!

Jan

On 02/12/2023 19:29, Steve Lime wrote:
One other thought, you can use multiple paths via runtime subs to 
approximate what I think you’re looking for, so:


WEB
  VALIDATION
    path1_default “/opt/path1”
    path1 “^\/opt\/path1$”
  path2_default “/opt/path2”
  path2 “^\/opt\/path2$”
  END
END

Then in DATA values you’d use %path1% or %path2%. This is another use 
case for variables that was suggested recently. We could, perhaps, 
define a way to mark something as immutable via url so the regex could 
be simplified and only the default would ever be used (e.g. “path2” 
“immutable”).


—Steve

On Fri, Dec 1, 2023 at 11:28 PM Steve Lime  wrote:

Nope, just the one value.

On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users
 wrote:

Hi,

Is it possible to use multiple paths in a shapepath?
./data1:./data2
does not work

Jan
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

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


[MapServer-users] multiple shapepaths

2023-12-01 Thread Jan Hartmann via MapServer-users

Hi,

Is it possible to use multiple paths in a shapepath? ./data1:./data2 
does not work


Jan
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] PHP Mapscript: how to clone layers

2023-11-27 Thread Jan Hartmann via MapServer-users

Yes, that's it. Thanks, Seth!

It was an insidious migration problem. The old way of cloning a layer 
($l2 = new layerObj($oMap,$l1);) still works, but ignores the second 
parameter. So you get a default new layer, with STATUS OFF. I filled 
every member but that. No wonder the layers didn't turn on. Could this 
function be made to fail when called with two parameters?

On 26/11/2023 21:20, Seth G wrote:

Hi Jan,

I'm not a PHP MapScript user but you should be able to use:

$l2 = $l1->cloneLayer();

As per the note at the following link - "In the Java & PHP modules this method is 
named cloneLayer. "
https://mapserver.org/mapscript/mapscript-api/stub/mapscript.layerObj.html#mapscript.layerObj.clone

I'm guessing there is a clash with the a reserved keyword in PHP so the method 
needs a different name.

Seth

--
web:https://geographika.net  &https://mapserverstudio.net
twitter: @geographika

On Sun, Nov 26, 2023, at 7:38 PM, Jan Hartmann via MapServer-users wrote:

Hi,

In previous versions of PHP MapScript a new layer was defined as:

$l2 = new layerObj($oMap,$l1);

$l1 is the base layer from which $l2 is copied.

In MapScript SWIG the second parameter has disappeared. $l2 has to be
cloned from $l1, and then inserted into the map. With PHP-MapScript this
should be:

$l2 = $l1->clone();
$oMap->insertLayer($l2);

But there is no PHP-MapScript function layerObj::clone. What do I miss?

Jan



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


[MapServer-users] PHP Mapscript: how to clone layers

2023-11-26 Thread Jan Hartmann via MapServer-users

Hi,

In previous versions of PHP MapScript a new layer was defined as:

$l2 = new layerObj($oMap,$l1);

$l1 is the base layer from which $l2 is copied.

In MapScript SWIG the second parameter has disappeared. $l2 has to be 
cloned from $l1, and then inserted into the map. With PHP-MapScript this 
should be:


$l2 = $l1->clone();
$oMap->insertLayer($l2);

But there is no PHP-MapScript function layerObj::clone. What do I miss?

Jan



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


Re: [MapServer-users] How to cascade data from OGC API Features service?

2023-11-14 Thread Jan Hartmann via MapServer-users

Hi Jukka,

Sometimes there are problems when the actual filenames in the vrt are 
relative pathnames. Especially with the new mapscript.php include file. 
Perhaps you could try that.


Jan

On 13/11/2023 22:48, Rahkonen Jukka via MapServer-users wrote:


Hi,

I tried to make a WMS layer from OGC API Features service but I did 
not success. This is my best trial so far:


I am using Mapserver from MS4W 5.0.0 RC1
I wrote this ORG VRT file (ogcfeat.vrt)



    

OAPIF:https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/

building

    



The GDAL included in MS4W reads the vrt OK with

ogrinfo ogcfeat.vrt -al -so --debug on
(there are 5 millions polygons so hit Ctrl-C if you are just testing)

I wrote a layer that can be at the bottom of this message below.  The 
WMS GetCapabilities show the new layer but GetMaps fail. The log file 
collects these errors


msDrawMap(): Image handling error. Failed to draw layer named 'building'.

msOGRFileOpen(): OGR error. Open failed for OGR connection in layer 
`building'. File not found or unsupported format. Check server logs.


Open failed for OGR connection in layer `building'.

Am I missing something from my configuration? My LAYER is like this

LAYER

    NAME "building"

    STATUS ON

    CONNECTIONTYPE OGR

CONNECTION "c:/ms4w_data/oapif.vrt"

    DATA "building"

    TYPE POLYGON

#    DEBUG 5

    UNITS METERS

    SIZEUNITS PIXELS

   MAXSCALEDENOM 6

   TOLERANCE 3

    TOLERANCEUNITS PIXELS

    METADATA

    "wms_title" "OGCFeat-building"

"wms_include_items" "all"

END #metadata

    PROJECTION

  "init=epsg:3067"   ##recommended

END

CLASS

  NAME "building"

  STYLE

    COLOR 200 255 200

    OUTLINECOLOR 120 120 120

  END # Style

    END # Class

    TEMPLATE "empty" ##recommended (enable GetFeatureInfo / can point 
to valid .html template)


 END # Layer

-Jukka Rahkonen-


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


Re: [MapServer-users] PHP-Mapscript: write imageObj to stdout

2023-11-13 Thread Jan Hartmann via MapServer-users
Yes, this works. Thanks Vassili and Sven. Is there any difference 
between getBytes() and msIO_getStdoutBufferBytes()?


On 13/11/2023 09:51, Vassilis Chatzigiannakis via MapServer-users wrote:

Yes, in php using swig it would be:

$oImg = $this->oMap->draw();
echo $oImg->getBytes()

-Original Message-
From: MapServer-users  On Behalf Of 
Sven Schroeter via MapServer-users
Sent: Monday, November 13, 2023 10:44 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [MapServer-users] PHP-Mapscript: write imageObj to stdout

Hi Jan,

maybe you need this:

          //SWIG
          if($mapscriptSwig) {
              echo msIO_getStdoutBufferBytes();
          }else{
              echo ms_iogetStdoutBufferBytes();
          }

Sven


Am 10.11.2023 um 18:59 schrieb Jan Hartmann via MapServer-users:

Hi,

In previous versions of PHP-Mapscript there was a function
ImageObj->saveImage(fn), that wrote an ImageObj to a file on disk.
When fn was empty, the image was sent to stdout. In SWIG-Mapscript,
this function has been replaced by ImageObj->save(fn), but fn cannot
be empty anymore. How do I send an ImageObj directly to stdout (i.e.
to the browser)?

Jan
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


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


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


[MapServer-users] PHP-Mapscript: write imageObj to stdout

2023-11-10 Thread Jan Hartmann via MapServer-users



Hi,

In previous versions of PHP-Mapscript there was a function 
ImageObj->saveImage(fn), that wrote an ImageObj to a file on disk. When 
fn was empty, the image was sent to stdout. In SWIG-Mapscript, this 
function has been replaced by ImageObj->save(fn), but fn cannot be empty 
anymore. How do I send an ImageObj directly to stdout (i.e. to the browser)?


Jan
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Docker image for MapServer with PHP-MapScript

2023-11-08 Thread Jan Hartmann via MapServer-users


Thanks Steve. I should have been able to guess that, but the 
PHP-MapScript documentation 
(https://mapserver.org/mapscript/php/index.html) still has a metadata 
member for the MapObj. As well as for the WebObj


As has been said before, the documentation for PHP Mapscript 
(https://mapserver.org/mapscript/php/index.html) is not very helpful. 
Essentially, it still describes the pre-SWIG version. I have been 
compiling MapServer since before the first marvelous MapServer-meeting 
in 2003 (https://maps.hisgis.nl/conferences/2003/mum/, look at the 
photographs!), but I have been using the UbuntuGIS version for the last 
few years. It was really a pain to get the current version working from 
scratch in a user directory. I was almost starting to think about 
switching to GeoServer :-). To get the "official" PHP-Mapscript-guide 
working I had to use:


https://ms4w.com/trac/wiki/MigrationGuide5.x
https://mapserver.org/MIGRATION_GUIDE.html
https://mapserver.org/mapscript/php/migration_guide.html
https://mapserver.org/mapscript/php/index.html

The main new requirements (including mapscript.php and setting 
mapserver.conf) core-dump the PHP-script when missing, so that too leads 
to some not-so-nice debugging. I would strongly advise to bring the 
documentation of MapScript up to date and to base it on the most recent 
version. And to clean out a bit the remnants of previous releases.


There seems to be a working Docker-version for MapServer/Mapscript in 
Debian Bookworm 
(https://lists.osgeo.org/pipermail/mapserver-dev/2023-October/017032.html), 
but I haven't tested it yet. Has anyone worked with it? And does anyone 
know of a recent Docker version for Mapserver/Mapscript in Alpine? Some 
organisations I am working for in the Euregio Aachen-Liege-Maastricht 
require Alpine for their Docker version.


Anyway, thanks to Tanya, Vassilis and Steve,

Jan Hartmann
Amsterdam

On 30/10/2023 18:56, Lime, Steve D (MNIT) wrote:


Map-level metadata lives in the WEB object…

*From:* MapServer-users  *On 
Behalf Of *Jan Hartmann via MapServer-users

*Sent:* Monday, October 30, 2023 12:46 PM
*To:* Vassilis Chatzigiannakis ; 
mapserver-users@lists.osgeo.org
*Subject:* Re: [MapServer-users] Docker image for MapServer with 
PHP-MapScript


Almost there. There are additional migration examples in: 
https://ms4w.com/trac/wiki/MigrationGuide5.x



I wrote wrapper functions for the old ms_new... functions, and can 
create that way a new mapObj called $oMap.


The "set" function has been  renamed  to "__set" : not 
$oMap->set("maxsize",6020), but: ;$oMap->__set("maxsize",6020);


Layers can be declared as before:  $layer = $oMap->getLayer(1).

Metadata have to be set as follows:

Not: $layer->setMetadata("...","..."); but: 
$layer->metadata->set("...","...")


However, I cannot set the metadata of the mapObj: 
$oMap->metadata->set("...","...") gives: "Undefined array key "metadata""


Any idea?

On 29/10/2023 07:52, Vassilis Chatzigiannakis wrote:

Yes the documentation is a mess .

I worked with this reference:

    https://mapserver.org/mapscript/mapscript-api/index.html

So, you start by

$oMap= newmapObj($mapfile);

Best regards,

Vassilis

*From:* Jan Hartmann 
<mailto:j.l.h.hartm...@gmail.com>
*Sent:* Saturday, October 28, 2023 9:14 PM
*To:* Vassilis Chatzigiannakis 
<mailto:vcha...@itml.gr>; mapserver-users@lists.osgeo.org
*Subject:* Re: [MapServer-users] Docker image for MapServer with
PHP-MapScript

This seems to work.  And it says so in the migration guide
(https://mapserver.org/mapscript/php/migration_guide.html):

all of your PHP scripts (that leverage MapServer objects and
functions) must now always first include the generated
mapscript.php file containing MapServer constants:

But could it be that only "$m = new mapObj('...');" is accepted,
and "$m=ms_newMapObj('...');" isn't? The docs still mention the
old call (https://mapserver.org/mapscript/php/phpmapscript.html

On 28/10/2023 09:11, Vassilis Chatzigiannakis wrote:

Hi,

I did it recently. There should be a mapscript.php file in the
same folder as the  php_mapscriptng.so extension.

    You need to include it in your php script.

Best,

Vassilis

*From:* MapServer-users

<mailto:mapserver-users-boun...@lists.osgeo.org> *On Behalf Of
*Jan Hartmann via MapServer-users
*Sent:* Friday, October 27, 2023 9:42 PM
*To:* mapserver-users@lists.osgeo.org
*Subject:* Re: [MapServer-users] Docker image for MapServer
with PHP-MapScript

I made a docker version of mapserver/php-mapscript myself,
based on Ubuntu 22.04. I installed all required librar

Re: [MapServer-users] Docker image for MapServer with PHP-MapScript

2023-10-30 Thread Jan Hartmann via MapServer-users
Almost there. There are additional migration examples in: 
https://ms4w.com/trac/wiki/MigrationGuide5.x



I wrote wrapper functions for the old ms_new... functions, and can 
create that way a new mapObj called $oMap.


The "set" function has been  renamed  to "__set" : not 
$oMap->set("maxsize",6020), but: ;$oMap->__set("maxsize",6020);


Layers can be declared as before:  $layer = $oMap->getLayer(1).

Metadata have to be set as follows:

Not: $layer->setMetadata("...","..."); but: 
$layer->metadata->set("...","...")


However, I cannot set the metadata of the mapObj: 
$oMap->metadata->set("...","...") gives: "Undefined array key "metadata""


Any idea?

On 29/10/2023 07:52, Vassilis Chatzigiannakis wrote:


Yes the documentation is a mess .

I worked with this reference:

https://mapserver.org/mapscript/mapscript-api/index.html

So, you start by

$oMap= newmapObj($mapfile);

Best regards,

Vassilis

*From:* Jan Hartmann 
*Sent:* Saturday, October 28, 2023 9:14 PM
*To:* Vassilis Chatzigiannakis ; 
mapserver-users@lists.osgeo.org
*Subject:* Re: [MapServer-users] Docker image for MapServer with 
PHP-MapScript


This seems to work.  And it says so in the migration guide 
(https://mapserver.org/mapscript/php/migration_guide.html):


all of your PHP scripts (that leverage MapServer objects and 
functions) must now always first include the generated 
mapscript.php file containing MapServer constants:


But could it be that only "$m = new mapObj('...');" is accepted, and 
"$m=ms_newMapObj('...');" isn't? The docs still mention the old call 
(https://mapserver.org/mapscript/php/phpmapscript.html


On 28/10/2023 09:11, Vassilis Chatzigiannakis wrote:

Hi,

I did it recently. There should be a mapscript.php file in the
same folder as the  php_mapscriptng.so extension.

You need to include it in your php script.

Best,

Vassilis

*From:* MapServer-users 
<mailto:mapserver-users-boun...@lists.osgeo.org> *On Behalf Of
*Jan Hartmann via MapServer-users
*Sent:* Friday, October 27, 2023 9:42 PM
*To:* mapserver-users@lists.osgeo.org
*Subject:* Re: [MapServer-users] Docker image for MapServer with
PHP-MapScript

I made a docker version of mapserver/php-mapscript myself, based
on Ubuntu 22.04. I installed all required libraries with apt, and
compiled mapserver and mapscript according to instructions. No
problem at all.

At the end I got the following from phpinfo();



mapscript

*MapServer Version*



MapServer version 8.0.1 PROJ version 9.3 GDAL version 3.4
OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=OGCAPI_SERVER SUPPORTS=GEOS
INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
INPUT=FLATGEOBUF


But no mapscript function or object was regognized in my PHP-scripts:

PHP Fatal error:  Uncaught Error: Class "mapObj" not found in
/virdir/www_root/test.php:2
Stack trace:
#0 {main}
  thrown in /virdir/www_root/test.php on line 2


I am really desparate. Has anyone ever succeeded to get
php_mapscriptng.so to work?  Or does anyone know of a working
Docker image for MapServer with PHP MapScript?

Jan

On 21/10/2023 05:40, Jan Hartmann wrote:

I tried this with serveral versions of PHP and MapServer, but
got always the same result. Can anyone point me to a Docker
image for MapServer + PHP-MapScript?

Jan

On 19/10/2023 18:12, Jan Hartmann wrote:

Still not there. Everything has been installed, and
phpinfo() gives:

*MapServer Version*



MapServer version 8.0.1 PROJ version 9.3 GDAL version 3.7
OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=OGCAPI_SERVER INPUT=JPEG INPUT=POSTGIS INPUT=OGR
INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF


But calling "$map = new mapObj('mapfile.map');" gives:

*Fatal error*: Uncaught Error: Class "mapObj" not found in
/mnt/virdir/www_root/test/test_mapscript.php:2 Stack
trace: #0 {main} thrown in
*/mnt/virdir/www_root/test/test_mapscript.php* on line *2

*Any idea?

Jan

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


Re: [MapServer-users] Docker image for MapServer with PHP-MapScript

2023-10-28 Thread Jan Hartmann via MapServer-users
This seems to work.  And it says so in the migration guide 
(https://mapserver.org/mapscript/php/migration_guide.html):


all of your PHP scripts (that leverage MapServer objects and functions) 
must now always first include the generatedmapscript.phpfile containing 
MapServer constants:


But could it be that only "$m = new mapObj('...');" is accepted, and 
"$m=ms_newMapObj('...');" isn't? The docs still mention the old call 
(https://mapserver.org/mapscript/php/phpmapscript.html


On 28/10/2023 09:11, Vassilis Chatzigiannakis wrote:


Hi,

I did it recently. There should be a mapscript.php file in the same 
folder as the  php_mapscriptng.so extension.


You need to include it in your php script.

Best,

Vassilis

*From:* MapServer-users  *On 
Behalf Of *Jan Hartmann via MapServer-users

*Sent:* Friday, October 27, 2023 9:42 PM
*To:* mapserver-users@lists.osgeo.org
*Subject:* Re: [MapServer-users] Docker image for MapServer with 
PHP-MapScript


I made a docker version of mapserver/php-mapscript myself, based on 
Ubuntu 22.04. I installed all required libraries with apt, and 
compiled mapserver and mapscript according to instructions. No problem 
at all.


At the end I got the following from phpinfo();


mapscript

*MapServer Version*



MapServer version 8.0.1 PROJ version 9.3 GDAL version 3.4 OUTPUT=PNG 
OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER 
SUPPORTS=OGCAPI_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF



But no mapscript function or object was regognized in my PHP-scripts:

PHP Fatal error:  Uncaught Error: Class "mapObj" not found in 
/virdir/www_root/test.php:2

Stack trace:
#0 {main}
  thrown in /virdir/www_root/test.php on line 2


I am really desparate. Has anyone ever succeeded to get 
php_mapscriptng.so to work?  Or does anyone know of a working Docker 
image for MapServer with PHP MapScript?


Jan

On 21/10/2023 05:40, Jan Hartmann wrote:

I tried this with serveral versions of PHP and MapServer, but got
always the same result. Can anyone point me to a Docker image for
MapServer + PHP-MapScript?

Jan

On 19/10/2023 18:12, Jan Hartmann wrote:

Still not there. Everything has been installed, and phpinfo()
gives:

*MapServer Version*



MapServer version 8.0.1 PROJ version 9.3 GDAL version 3.7
OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=OGCAPI_SERVER INPUT=JPEG
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
INPUT=FLATGEOBUF


But calling "$map = new mapObj('mapfile.map');" gives:

*Fatal error*: Uncaught Error: Class "mapObj" not found in
/mnt/virdir/www_root/test/test_mapscript.php:2 Stack trace: #0
{main} thrown in
*/mnt/virdir/www_root/test/test_mapscript.php* on line *2

*Any idea?

Jan

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


Re: [MapServer-users] Docker image for MapServer with PHP-MapScript

2023-10-27 Thread Jan Hartmann via MapServer-users
I made a docker version of mapserver/php-mapscript myself, based on 
Ubuntu 22.04. I installed all required libraries with apt, and compiled 
mapserver and mapscript according to instructions. No problem at all.


At the end I got the following from phpinfo();


   mapscript

MapServer Version 	MapServer version 8.0.1 PROJ version 9.3 GDAL version 
3.4 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER 
SUPPORTS=OGCAPI_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR 
INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF



But no mapscript function or object was regognized in my PHP-scripts:

PHP Fatal error:  Uncaught Error: Class "mapObj" not found in 
/virdir/www_root/test.php:2

Stack trace:
#0 {main}
  thrown in /virdir/www_root/test.php on line 2


I am really desparate. Has anyone ever succeeded to get 
php_mapscriptng.so to work?  Or does anyone know of a working Docker 
image for MapServer with PHP MapScript?


Jan

On 21/10/2023 05:40, Jan Hartmann wrote:
I tried this with serveral versions of PHP and MapServer, but got 
always the same result. Can anyone point me to a Docker image for 
MapServer + PHP-MapScript?


Jan

On 19/10/2023 18:12, Jan Hartmann wrote:

Still not there. Everything has been installed, and phpinfo() gives:

MapServer Version 	MapServer version 8.0.1 PROJ version 9.3 GDAL 
version 3.7 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=OGCAPI_SERVER INPUT=JPEG INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF



But calling "$map = new mapObj('mapfile.map');" gives:

*Fatal error*: Uncaught Error: Class "mapObj" not found in 
/mnt/virdir/www_root/test/test_mapscript.php:2 Stack trace: #0 {main} 
thrown in*/mnt/virdir/www_root/test/test_mapscript.php*on line*2


*Any idea?

Jan


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


[MapServer-users] Docker imgage for MapServer with PHP-MapScript

2023-10-20 Thread Jan Hartmann via MapServer-users
I tried this with serveral versions of PHP and MapServer, but got always 
the same result. Can anyone point me to a Docker image for MapServer + 
PHP-MapScript?


Jan

On 19/10/2023 18:12, Jan Hartmann wrote:

Still not there. Everything has been installed, and phpinfo() gives:

MapServer Version 	MapServer version 8.0.1 PROJ version 9.3 GDAL 
version 3.7 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=OGCAPI_SERVER INPUT=JPEG INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF



But calling "$map = new mapObj('mapfile.map');" gives:

*Fatal error*: Uncaught Error: Class "mapObj" not found in 
/mnt/virdir/www_root/test/test_mapscript.php:2 Stack trace: #0 {main} 
thrown in*/mnt/virdir/www_root/test/test_mapscript.php*on line*2


*Any idea?

Jan
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[MapServer-users] Installing PHP-MapScript from source

2023-10-19 Thread Jan Hartmann via MapServer-users

Still not there. Everything has been installed, and phpinfo() gives:

MapServer Version 	MapServer version 8.0.1 PROJ version 9.3 GDAL version 
3.7 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER 
SUPPORTS=OGCAPI_SERVER INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE INPUT=FLATGEOBUF



But calling "$map = new mapObj('mapfile.map');" gives:

*Fatal error*: Uncaught Error: Class "mapObj" not found in 
/mnt/virdir/www_root/test/test_mapscript.php:2 Stack trace: #0 {main} 
thrown in*/mnt/virdir/www_root/test/test_mapscript.php*on line*2


*Any idea?

Jan___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Compiling mapserver with php in user directory

2023-10-19 Thread Jan Hartmann via MapServer-users
Hi Jeff, I appreciate your advice, but I solved the problem with a hack, 
and to be honest, CMAKE error handling is above me. I am still from the 
./configure generation :-)


I added these two lines to MapServer's CMAKE call:

 -DPHP_INCLUDE_PATH=$INSTALLBIN/include/php/main \
-DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829

I also had to add these lines to GEOS's CMAKE, after 
-DCMAKE_INSTALL_PREFIX=$INSTALLBIN  -DCMAKE_PREFIX_PATH=$INSTALLBIN \


-DCMAKE_LIBRARY_PATH=$INSTALLBIN/lib \
-DINCLUDE_DIRECTORIES=$INSTALLBIN/include \

I guess CMAKE does not propagate its dependencies very well from the 
general INSTALL_PREFIX.


But this still didn't work. The php includes in other subdirectories 
than main weren't found. Those subdirectories should have been added to 
the include path, but weren't. So I copied the complete php include 
directory to /usr/include (O horror! :-)) .


Of course a Docker installation would be easier, as you can install 
everything in standard locations. But I want to have a real dedicated 
server with just the software I need and nothing more. I have worked for 
a long time with the UbuntuGIS packages, but they are not supported very 
well.


Thanks for your advice!

Jan



On 18/10/2023 19:11, Jeff McKenna via MapServer-users wrote:

Hi Jan,

I understand that you won't listen to my advice here, no problem at all. 
 But I won't repeat myself here 🙂


Enjoy your afternoon,

-jeff

On 2023-10-18 1:39 p.m., Jan Hartmann wrote:

I compiled with:

  -DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \
  -DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829 



and got lots of error messages about missing .h files (php.h, zend.h 
etc). I bulk copied them all to the directory in the build tree where 
the errors came from, and got a complete build, including 
"php_mapscriptng.so"


So CMAKE is still missing the php include directories. What is de 
correct DEFINE for that?


After I copied php_mapscriptng.so to the correct location and filling 
in php.ini, I got a warning when starting PHP :


Startup: Unable to load dynamic library 'php_mapscriptng.so' (tried: 
/virdir/installbin/lib/php/extensions/no-debug-non-zts-20220829/php_mapscriptng.so 
(libgeos.so.3.12.0: cannot open shared object file: No such file or 
directory)


But  it *is* in that location. Any idea?

On 17/10/2023 21:45, Jeff McKenna via MapServer-users wrote:

Hi Jan,

Unfortunately I have much experience tracking down CMake errors now, 
ha.


Instead of the error log, scroll up and read the output from your 
cmake command (as it does its checks and looks for libraries), I 
find examining that output is crucial (and I personally find the 
actual generated log file is filled of fake/"red-herrings"). Focus 
instead on going line-by-line through that cmake output, as it makes 
its way down to the final "configuring incomplete" message.  (for 
packaging, this is what I do, line-by-line)


For example, if you are trying to enable the GEOS library, I would 
go line-by-line of the output and find where it was looking for GEOS 
initially, and read the messages in that section, to confirm that 
there are no issues when enabling GEOS.  This is crucial.


It takes much time to do this for each library.

In my case, for PHPNG support, my CMake command includes: 
"-DWITH_PHPNG=1 -DPHP_EXTENSION_DIR=/usr/lib/php/20220829"


In your case I am not sure, but, I would start by examining 
line-by-line the CMake output before the words "Configuring 
incomplete" (and totally ignoring the generated 'output' file).


Maybe you can find the PHPNG section in your cmake command output, 
and paste that here for the community to review.


-jeff








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


Re: [MapServer-users] Compiling mapserver with php in user directory

2023-10-18 Thread Jan Hartmann via MapServer-users

I compiled with:

 -DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \
 -DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829

and got lots of error messages about missing .h files (php.h, zend.h 
etc). I bulk copied them all to the directory in the build tree where 
the errors came from, and got a complete build, including 
"php_mapscriptng.so"


So CMAKE is still missing the php include directories. What is de 
correct DEFINE for that?


After I copied php_mapscriptng.so to the correct location and filling in 
php.ini, I got a warning when starting PHP :


Startup: Unable to load dynamic library 'php_mapscriptng.so' (tried: 
/virdir/installbin/lib/php/extensions/no-debug-non-zts-20220829/php_mapscriptng.so 
(libgeos.so.3.12.0: cannot open shared object file: No such file or 
directory)


But  it *is* in that location. Any idea?

On 17/10/2023 21:45, Jeff McKenna via MapServer-users wrote:

Hi Jan,

Unfortunately I have much experience tracking down CMake errors now, ha.

Instead of the error log, scroll up and read the output from your 
cmake command (as it does its checks and looks for libraries), I find 
examining that output is crucial (and I personally find the actual 
generated log file is filled of fake/"red-herrings"). Focus instead on 
going line-by-line through that cmake output, as it makes its way down 
to the final "configuring incomplete" message.  (for packaging, this 
is what I do, line-by-line)


For example, if you are trying to enable the GEOS library, I would go 
line-by-line of the output and find where it was looking for GEOS 
initially, and read the messages in that section, to confirm that 
there are no issues when enabling GEOS.  This is crucial.


It takes much time to do this for each library.

In my case, for PHPNG support, my CMake command includes: 
"-DWITH_PHPNG=1 -DPHP_EXTENSION_DIR=/usr/lib/php/20220829"


In your case I am not sure, but, I would start by examining 
line-by-line the CMake output before the words "Configuring 
incomplete" (and totally ignoring the generated 'output' file).


Maybe you can find the PHPNG section in your cmake command output, and 
paste that here for the community to review.


-jeff




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


[MapServer-users] Compiling mapserver with php in user directory

2023-10-17 Thread Jan Hartmann via MapServer-users
Hi all,

 I am trying to compile MapServer with all dependencies in a separate 
user-directory. Everything has been compiled with —prefix=$INSTALLBIN.  PHP has 
also been compiled into that directory, but I don't get MapServer to use it. It 
compiles against the system-php, but that is another version than the compiled 
one. I call CMAKE with the following options:

   ...
-DGDAL_LIBRARY=$INSTALLBIN/lib/libgdal.so \
-DGDAL_INCLUDE_DIR=$INSTALLBIN/include \
...

I removed the sysem-PHP, and added -DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \, 
but that doesn't work, and I cannot find the PHP-library to add.

CMAKE ends with the message:  "Configuring incomplete, errors occurred!", 
without giving the precise errors. In the error log I get messages of missing 
"strrstr", "strlcat" and strlcpy".

Can you help me?

Jan Hartmann
Amsterdam
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Problem with html legend

2020-04-28 Thread Jan Hartmann
Thanks, Jeff, hope you enjoyed your Easter too. I thought that an 
embedded legend would automatically show the HTML page in the map, when 
a HTML template is specified. It doesn't, it just ignores the template 
and displays the default, automatically generated legend. Same goes for 
the GetLegendGraphics WMS request. Is this a bug? If not, how can I get 
the HTML legend embedded in the map, or returned with GetLegendGraphics?


Jan

On 4/12/2020 4:24 PM, Jeff McKenna wrote:

Hi Jan,

I have updated the legend demos (and the OGR demos) to run on 
MapServer 7.4.4 : 
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdemo.mapserver.org%2F&data=02%7C01%7Cj.l.h.hartmann%40uva.nl%7C7e699bd31de646dd6d4d08d7deed51b1%7Ca0f1cacd618c4403b94576fb3d6874e5%7C1%7C0%7C637222983176020243&sdata=VZYPnx0csqnodR7W9GLhzt1ckvY5QuP8ICGPv98B59g%3D&reserved=0


Please let me know if you ever notice any more issues with the demos.

I also added a link to the mapfile in the legend demos (see bottom of 
each demo page), which should help you debug your local issue.


Wishing you a safe and happy Easter with your family.

-jeff





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

[mapserver-users] Problem with html legend

2020-04-07 Thread Jan Hartmann
Probably some silly mistake, but I can't get the MapServer HTML legend 
working. My mapfile has:


legend
    status embed
    label
    size tiny
    end
    template "paleogeography_legend.html"
end

And "paleogeography_legend.html" just has:

[leg_class_html opt_flag=15]
   --- [leg_class_name]
[/leg_class_html]

This should return the same legend as without the template, but with 
"---" added between icon and classname, right? It doesn't. It always 
returns the default legend, as if the html template doesn't get read.


Can anyone help?

(BTW, the demo on https://demo.mapserver.org/itasca_legend/ is broken)

Jan



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

[mapserver-users] mapscript with php as module does not flush buffers

2020-01-02 Thread Jan Hartmann

Hi all,

I use PHP-Mapscript to server WMS-maps, with a MapFile based on an 
underlying VRT-file. My application changes the geometry transformation 
of the VRT-file, and reloads the WMS. It uses the same MapFile ($oMap = 
ms_newMapObj($mapfile), but with a changed underlying VRT-file;


When I use PHP as CGI, the reloaded WMS correctly shows the map with the 
new transformation. With PHP as an Apache module,  older transformations 
are displayed in a random manner. I guess the VRT-file gets buffered 
somewhere, but I am unable to flush that buffer, either with 
PHP-functions or with random parameters for the WMS-call.


Any ideas? I would prefer to use PHP as a module.

Thanks,

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

Re: [mapserver-users] Doubling of labels on high resolution maps

2019-10-17 Thread Jan Hartmann
No, neither maxsize nor partials works. I guess that's just the way QGIS 
requests large WMS-images.


There is a "tile_metatile_level" configuration directive that should 
solve this problem:


https://mapserver.org/output/tile_mode.html

but it does not seem to work for WMS layers.

So I used the underlying PostGIS layer in QGIS, and that works OK, of 
course. Not sure if this is a bug in MapServer, though.


Thanks for your help,

Jan

On 10/16/2019 5:55 PM, Rahkonen Jukka (MML) wrote:


Hi,

Print composer is probably making tiled requests from WMS. That is 
compulsory for any bigger maps because the default maxsize on the 
Mapserver side is 2048x2048 pixels 
https://mapserver.org/uk/mapfile/map.html. It is easy to increase the 
maxsize but I do not know if print composer as a client can be aware 
of that.


Partials FALSE may help, but based on the screenshot it is possible 
that print composer is making requests with some overlap.


-Jukka Rahkonen-

*Lähettäjä:*mapserver-users  
*Puolesta *Travis Kirstine

*Lähetetty:* keskiviikko 16. lokakuuta 2019 18.24
*Vastaanottaja:* Jan Hartmann 
*Kopio:* MapServer-users 
*Aihe:* Re: [mapserver-users] Doubling of labels on high resolution maps

There are a few options you could add to your label but I would start with

MINDISTANCE 200

PARTIALS FALSE

See

https://mapserver.org/mapfile/label.html

On Wed, 16 Oct 2019 at 10:37, Jan Hartmann <mailto:j.l.h.hartm...@uva.nl>> wrote:


Hi,

I'm trying to generate high resolution print maps with QGIS, based
on a MapServer WMS layer. When displayed in the regular QGIS
application with 72dpi, all looks fine. When using the Print
Composer based on the same Mapfile, but with 300dpi, some labels
are duplicated (not all). Some duplicates are clipped. The two
versions can be seen here:

https://maps.hisgis.nl/marken_072dpi.png
https://maps.hisgis.nl/marken_300dpi.png

Below the Mapfile.  Any idea what goes wrong here?

Jan

map
name Markegrenzen

web
  metadata
    "wms_title" "Markegrenzen"
    "wms_srs" "EPSG:28992 EPSG:3857"
    "wms_extent"  "13000 301000 279000 62"
    "wms_enable_request" "*"
  end
end

extent 13000 301000 279000 62
units meters
size 400 400
resolution 300
defresolution 72


projection
  "init=epsg:28992"
end

z
layer
  name Markegrenzen
  status on
  type polygon
  connectiontype postgis
  connection "dbname=ov options='-c search_path=horigheid,public'"
  data " the_geom from (
    select gid,the_geom,naam from markegrenzen
    ) as foo using unique gid using srid=28992
  "
  labelitem "naam"
  class
    style
    outlinecolor 255 0 0
    width 1
    end
    label
    color 255 0 0
    size 4
    end
  end
end
end

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
<mailto:mapserver-users@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users



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

[mapserver-users] Doubling of labels on high resolution maps

2019-10-16 Thread Jan Hartmann

Hi,

I'm trying to generate high resolution print maps with QGIS, based on a 
MapServer WMS layer. When displayed in the regular QGIS application with 
72dpi, all looks fine. When using the Print Composer based on the same 
Mapfile, but with 300dpi, some labels are duplicated (not all). Some 
duplicates are clipped. The two versions can be seen here:


https://maps.hisgis.nl/marken_072dpi.png
https://maps.hisgis.nl/marken_300dpi.png

Below the Mapfile.  Any idea what goes wrong here?

Jan

map
name Markegrenzen

web
  metadata
    "wms_title" "Markegrenzen"
    "wms_srs" "EPSG:28992 EPSG:3857"
    "wms_extent"  "13000 301000 279000 62"
    "wms_enable_request" "*"
  end
end

extent 13000 301000 279000 62
units meters
size 400 400
resolution 300
defresolution 72


projection
  "init=epsg:28992"
end

z
layer
  name Markegrenzen
  status on
  type polygon
  connectiontype postgis
  connection "dbname=ov options='-c search_path=horigheid,public'"
  data " the_geom from (
    select gid,the_geom,naam from markegrenzen
    ) as foo using unique gid using srid=28992
  "
  labelitem "naam"
  class
    style
    outlinecolor 255 0 0
    width 1
    end
    label
    color 255 0 0
    size 4
    end
  end
end
end


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

[mapserver-users] Getting data values from heatmap

2019-10-08 Thread Jan Hartmann

Hi,

Is it possible to get the actual data values from the pixel values of a 
heatmap? A heatmap is computed by mapping a data range to values between 
0 and 255, and then displaying these values based on a color ramp. So 
what you see is a map with colors ranging from (say) blue to red. BLue 
are low data values, red high ones. Is it possible to generate a legend 
with the actual values for these colors?


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

Re: [mapserver-users] Gallery: running mapserver in docker on kubernetes

2019-08-30 Thread Jan Hartmann
Impressive, looks like viscurl is a real alternative to local files. 
Thanks for the information, I'm certainly going to look further on this.


Jan

On 8/30/2019 6:15 PM, Peter Schmitt wrote:
On Fri, Aug 30, 2019 at 9:48 AM Jan Hartmann <mailto:j.l.h.hartm...@uva.nl>> wrote:


Thanks Peter, this is really useful. Do you have any real-world
benchmarks for MapServer that compare regular file access with
vsicurl access, using optimized Geotifs? I've seen the tests for
GDAL at https://trac.osgeo.org/gdal/wiki/CloudOptimizedGeoTIFF,
but what about servering  large map-sets over the web?

I don't have any sort of formal benchmarks... but I can provide 
anecdotes from my experiences. Random access to a 256x256 block of 
extremely large COGs served from fast SSD would have maybe 100ms 
response.  The same COG accessed with /vsicurl/:  First time the tile 
is requested about 400ms. GDAL has a least recently used curl cache.  
When a tile is cached, subsequent requests can be served maybe about 
100ms. My cloud provider is AWS... so access from s3 using MapServer 
running in a Docker container on an AWS EC2 instance in the us-east-1 
region... and the tile is requested from my local wireless network in 
Colorado.


When the data is a COG in s3 and MapServer runs near the cloud 
storage, performance is quite good. I've scaled only to dozens of 
users.  Allegedly s3 can scale to 5,500 requests per second per prefix 
in s3. 
https://docs.aws.amazon.com/AmazonS3/latest/dev/optimizing-performance.html Presumably 
it would scale fairly well by adding more MapServer processes.


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

Re: [mapserver-users] Gallery: running mapserver in docker on kubernetes

2019-08-30 Thread Jan Hartmann
Thanks Peter, this is really useful. Do you have any real-world 
benchmarks for MapServer that compare regular file access with vsicurl 
access, using optimized Geotifs? I've seen the tests for GDAL at 
https://trac.osgeo.org/gdal/wiki/CloudOptimizedGeoTIFF, but what about 
servering  large map-sets over the web?


On 8/30/2019 5:20 PM, Peter Schmitt wrote:

Hi Jan,

On Fri, Aug 30, 2019 at 6:20 AM Jan Hartmann <mailto:j.l.h.hartm...@uva.nl>> wrote:


Hi Pete, could you explain what you mean by "cloud-optimized geotiffs?


A Cloud Optimized GeoTIFF (COG) is a regular GeoTIFF file in which the 
data is structured for fast random access.  Some properties of a COG 
have always been useful for MapServer (Internally tiled & images have 
overview levels).  Other properties of a COG optimize for cloud access 
via GDAL's /vsicurl/ virtual filesystem (Image File Directories of the 
GeoTIFF are structured such that one HTTP request can fetch all the 
metadata needed to read subsequent blocks from an image).  This layout 
has been codified somewhat recently... Find out more here:


1. The COGEO organization summarizes things: https://www.cogeo.org 
<https://www.cogeo.org/>
2. This GDAL page talks about how to take a normal GeoTIFF, make it a 
COG and how to validate that a given GeoTIFF is a COG: 
https://trac.osgeo.org/gdal/wiki/CloudOptimizedGeoTIFF
3. GDAL >= 3.1 will have a new COG driver. This provides some 
syntactic sugar to generating a COG in a single gdal_translate 
command. https://gdal.org/drivers/raster/cog.html


Cheers,
Pete



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

Re: [mapserver-users] Gallery: running mapserver in docker on kubernetes

2019-08-30 Thread Jan Hartmann

Hi Pete, could you explain what you mean by "cloud-optimized geotiffs?

Regards,
Jan

On 8/29/2019 5:42 PM, Peter Schmitt wrote:
> If anyone is interested by our docker image, you can find it here: 
https://github.com/camptocamp/docker-mapserver


Thanks for sharing this, Yves!

Regarding /vsicurl/ performance you mentioned:

> We saw some drawback when displaying maps on low scale as too much 
files should be read. Visicurl seems copy the files in the container. 
We need to check this to confirm, but probably someone have a better 
understanding of how visicurl and visis3 work.


There might be two things at play:  First, using cloud-optimized 
geotiffs greatly reduces the number of curl requests required.  
Secondly, a few GDAL config options dramatically improved performance 
for me.  Here's what I've had the best luck with (although your 
specific use case probably requires different settings)


CONFIG "CPL_VSIL_CURL_ALLOWED_EXTENSIONS"      "vrt tif geojson zip gpkg"
CONFIG "GDAL_DISABLE_READDIR_ON_OPEN"       "YES"
CONFIG "GDAL_INGESTED_BYTES_AT_OPEN"      "262144" # Bytes. This is 
the value required to have 1 CURL request when opening one of our COGs 
that has many levels deep of overviews

CONFIG "VSI_CACHE"      "FALSE"
CONFIG "GDAL_CACHEMAX"      "80"       # MB
CONFIG "OGR_SQLITE_CACHE"                      "10"       # MB


I'm curious about this comment in your config: "mapserver has memory 
leaks, this limit should improve long term memory usage" 
https://github.com/camptocamp/docker-mapserver/blob/ba86f87b0ec1357ad5a8ae6159a005e24db64e3f/server/runtime/etc/apache2/conf-enabled/mapserver.conf#L1-L2


I've got a MapServer instance configured with > 100 million 
requests/year.  I also see some behavior suggesting a memory leak 
somewhere, but I have not tracked it down. Here's my Dockerized 
MapServer, which uses NGINX to proxy to MapServer via FCGI: 
https://github.com/pedros007/debian-mapserver


Here's my memory use for a Docker container running 8 mapserv 
processes. 300% in the scale corresponds to 3 GB of memory usage.

https://i.imgur.com/CXBDsuw.png

Cheers,
Pete



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

Re: [mapserver-users] Gallery: running mapserver in docker on kubernetes

2019-08-29 Thread Jan Hartmann
Thanks, this is a nice example to build a MapServer Docker container 
with. I need PHP-MapScript and an Apache and a PostgreSQL server with 
PostGIS and PLR, so there still are a few things to figure out. But this 
is a very handy starting point.


Jan

On 8/29/2019 1:38 PM, Wouter Visscher wrote:
On our github.com/PDOK <http://github.com/PDOK> is 
information/README.md on the Dockerfiles we run (also on docker hub 
https://hub.docker.com/u/pdok) we run a mapserver setup with lighttpd, 
we made this setup with deployment to kubernetes in mind. So we can 
interact with configmaps, secrets, env variables and so on..


On Thu, 29 Aug 2019, 14:10 Jan Hartmann, <mailto:j.l.h.hartm...@gmail.com>> wrote:


Hi Wouter, I am definitely interested in your setups, especially
the docker containers with mapserver. I've also a lot of separate
mapserver applications that I would like to manage more as a
whole. Although not with 12 billion requests a year . An example
is the complete population administration of Friesland on
historical and modern maps (mostly PDOK) from 1750 to 1890:

https://maps.hisgis.nl/fr/fs/

Please let me know what is already available  from PDOK; if
possible and useful, I would very much like to participate in the
pilot, e.g. concerning the MapServer Wiki part. I've been using
MapServer since 2000

Regards,

Jan Hartmann
University of Amsterdam
https://www.uva.nl/profiel/h/a/j.l.h.hartmann/j.l.h.hartmann.html

On 8/29/2019 12:54 PM, Wouter Visscher wrote:

Thanks for the suggestion. I will get on to that and put
something on github.

On Thu, 29 Aug 2019, 12:24 Jeff McKenna,
mailto:jmcke...@gatewaygeomatics.com>> wrote:

Thanks for wanting to share this; the best way is to create a
new wiki
page on the MapServer wiki
(https://github.com/mapserver/mapserver/wiki)
and there you can outline all of your infrastructure tricks,
then you
can come back here and paste your link to your MapServer magic :)

Thanks again,

-jeff



On 2019-08-29 4:55 AM, Wouter Visscher wrote:
> Hi all,
>
> I'm working for the Dutch NSDI www.pdok.nl
<http://www.pdok.nl> <http://www.pdok.nl/>, where
> we have around 200 datasets ranging from the larger ones
like address,
> buildings, cadastral parcels and smaller ones like
hikingtrails,
> natura2000, and so on. Our platform is used a lot in the
Netherlands,
> both by the public and private sector, last year we hit 12
billion
> requests. To be able to handle that amount of traffic we
are now in a
> transition, moving from a private cloud solution to the
public cloud.
> With this change, we needed to refactor our software stack.
>
> Through some experimentation, and on the job 'training' we
are now
> running the following setup:
> A minio.io <http://minio.io> <http://minio.io/> (S3)
blobstore, containing geopackages
> with the vector data and geotiff's for the rasters.
> Our mapserver configurations connects to these files with
/vsicurl/. Our
> mapservers are in docker containers that we run on kubernetes.
> With this setup we are able to create a scalable
infrastructure from
> which we can push WMS/WFS/WMTS interfaces to the web.
>
> If people are interested in how we deploy our mapserver
software stacks
> I would be happy to share our k8s deployment
setup/configurations.
>
> Wouter Visscher
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
<mailto:mapserver-users@lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>


-- 
Jeff McKenna

MapServer Consulting and Training Services
https://gatewaygeomatics.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
<mailto:mapserver-users@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users





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

Re: [mapserver-users] Gallery: running mapserver in docker on kubernetes

2019-08-29 Thread Jan Hartmann
Thanks, Yves. I see that you compiled mapserver yourself, and used 
standard distributions for all other packages (geos, gdal etc). Why did 
you not use the UbuntuGis binary for MapServer too?


You compiled with the following options:

cmake /src \

-GNinja \

-DCMAKE_BUILD_TYPE=Release \

-DCMAKE_INSTALL_PREFIX=/usr/local \

-DWITH_CLIENT_WMS=1 \

-DWITH_CLIENT_WFS=1 \

-DWITH_KML=1 \

-DWITH_SOS=1 \

-DWITH_XMLMAPFILE=1 \

-DWITH_POINT_Z_M=1 \

-DWITH_CAIRO=1 \

-DWITH_RSVG=1


Does this mean that this version does not support PHP-MapScript, PostGIS 
and GDAL input?


On 8/29/2019 1:16 PM, Yves Jacolin wrote:

Hello,

If anyone is interested by our docker image, you can find it here: 
https://github.com/camptocamp/docker-mapserver


Y.

Le jeu. 29 août 2019 à 13:14, Jan Hartmann <mailto:j.l.h.hartm...@uva.nl>> a écrit :


Hi Wouter, I am definitely interested in your setups, especially the
docker containers with mapserver. I've also a lot of separate
mapserver
applications that I would like to manage more as a whole. Although
not
with 12 billion requests a year . An example is the complete
population
administration of Friesland on historical and modern maps (mostly
PDOK)
from 1750 to 1890:

https://maps.hisgis.nl/fr/fs/

Please let me know what is already available  from PDOK; if
possible and
useful, I would very much like to participate in the pilot, e.g.
concerning the MapServer Wiki part. I've been using MapServer
since 2000

    Regards,

Jan Hartmann
University of Amsterdam
https://www.uva.nl/profiel/h/a/j.l.h.hartmann/j.l.h.hartmann.html

On 8/29/2019 11:24 AM, Jeff McKenna wrote:
> Thanks for wanting to share this; the best way is to create a
new wiki
> page on the MapServer wiki
> (https://github.com/mapserver/mapserver/wiki) and there you can
> outline all of your infrastructure tricks, then you can come
back here
> and paste your link to your MapServer magic :)
>
> Thanks again,
>
> -jeff
>
>
>
> On 2019-08-29 4:55 AM, Wouter Visscher wrote:
>> Hi all,
>>
>> I'm working for the Dutch NSDI www.pdok.nl <http://www.pdok.nl>
<http://www.pdok.nl/>,
>> where we have around 200 datasets ranging from the larger ones
like
>> address, buildings, cadastral parcels and smaller ones like
>> hikingtrails, natura2000, and so on. Our platform is used a lot in
>> the Netherlands, both by the public and private sector, last
year we
>> hit 12 billion requests. To be able to handle that amount of
traffic
>> we are now in a transition, moving from a private cloud
solution to
>> the public cloud. With this change, we needed to refactor our
>> software stack.
>>
>> Through some experimentation, and on the job 'training' we are now
>> running the following setup:
>> A minio.io <http://minio.io> <http://minio.io/> (S3) blobstore,
containing geopackages
>> with the vector data and geotiff's for the rasters.
>> Our mapserver configurations connects to these files with
/vsicurl/.
>> Our mapservers are in docker containers that we run on kubernetes.
>> With this setup we are able to create a scalable infrastructure
from
>> which we can push WMS/WFS/WMTS interfaces to the web.
>>
>> If people are interested in how we deploy our mapserver software
>> stacks I would be happy to share our k8s deployment
>> setup/configurations.
>>
>> Wouter Visscher
>>
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
<mailto:mapserver-users@lists.osgeo.org>
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
>

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
<mailto:mapserver-users@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users



--
Yves Jacolin
Training and support manager - Team Manager
Camptocamp

Tel (France) : +33 4 58 48 20 43
Tel (Switzerland) : +41 21 619 10 43
Mob. : +33 6 18 75 42 21

email : yves.jaco...@camptocamp.com <mailto:yves.jaco...@camptocamp.com>
http://www.camptocamp.com


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

Re: [mapserver-users] Gallery: running mapserver in docker on kubernetes

2019-08-29 Thread Jan Hartmann
Hi Wouter, I am definitely interested in your setups, especially the 
docker containers with mapserver. I've also a lot of separate mapserver 
applications that I would like to manage more as a whole. Although not 
with 12 billion requests a year . An example is the complete population 
administration of Friesland on historical and modern maps (mostly PDOK) 
from 1750 to 1890:


https://maps.hisgis.nl/fr/fs/

Please let me know what is already available  from PDOK; if possible and 
useful, I would very much like to participate in the pilot, e.g. 
concerning the MapServer Wiki part. I've been using MapServer since 2000


Regards,

Jan Hartmann
University of Amsterdam
https://www.uva.nl/profiel/h/a/j.l.h.hartmann/j.l.h.hartmann.html

On 8/29/2019 11:24 AM, Jeff McKenna wrote:
Thanks for wanting to share this; the best way is to create a new wiki 
page on the MapServer wiki 
(https://github.com/mapserver/mapserver/wiki) and there you can 
outline all of your infrastructure tricks, then you can come back here 
and paste your link to your MapServer magic :)


Thanks again,

-jeff



On 2019-08-29 4:55 AM, Wouter Visscher wrote:

Hi all,

I'm working for the Dutch NSDI www.pdok.nl <http://www.pdok.nl/>, 
where we have around 200 datasets ranging from the larger ones like 
address, buildings, cadastral parcels and smaller ones like 
hikingtrails, natura2000, and so on. Our platform is used a lot in 
the Netherlands, both by the public and private sector, last year we 
hit 12 billion requests. To be able to handle that amount of traffic 
we are now in a transition, moving from a private cloud solution to 
the public cloud. With this change, we needed to refactor our 
software stack.


Through some experimentation, and on the job 'training' we are now 
running the following setup:
A minio.io <http://minio.io/> (S3) blobstore, containing geopackages 
with the vector data and geotiff's for the rasters.
Our mapserver configurations connects to these files with /vsicurl/. 
Our mapservers are in docker containers that we run on kubernetes.
With this setup we are able to create a scalable infrastructure from 
which we can push WMS/WFS/WMTS interfaces to the web.


If people are interested in how we deploy our mapserver software 
stacks I would be happy to share our k8s deployment 
setup/configurations.


Wouter Visscher

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






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

Re: [mapserver-users] MS4W version 4.0.1 released

2019-08-26 Thread Jan Hartmann

Just curious, how can I use the RT Topology library within Mapserver?

Jan

On 8/26/2019 11:43 AM, Jeff McKenna wrote:

Hello everyone,

MS4W 4.0.1 is now available, which contains many security updates, as 
well as a few important changes.  Get it now at https://ms4w.com


Please see MS4W's HISTORY.txt for all of the changes, but here are 
some of the highlights:


- upgraded MapServer and MapScript (CSharp, Java, Python, PHP) to 
today’s 7.6.0-dev (also due to potential XSS vulnerability)
- disabled Pixman support in MapServer build, as it prevents Opacity 
(trac ticket 218)

- upgraded PHP to 7.2.21 (trac ticket 213)
- upgraded GDAL to 2.4.2 (trac ticket 195)
- upgraded Apache HTTP Server to 2.4.41 (trac ticket 206)
- upgraded MapCache to today’s 1.9dev (trac ticket 222)
- upgraded OpenSSL support to 1.1.1c (trac ticket 191)
- upgraded cURL support to 7.65.1
- upgraded NetCDF support to 4.7.0 (trac ticket 193)
- upgraded GEOS support to 3.7.2 trac ticket 214)
- rebuilt RT Topology Library
- upgraded libxml2 support to 2.9.9
- upgraded Freetype support to 2.10.1
- upgraded PostgreSQL support to 11.4 with SSL enabled (ticket 196)
- upgraded HDF5 support to 1.10.5
- upgraded SQLite support to 3.28.0
- rebuilt SpatiaLite support
- rebuilt spatialite-tools
- upgraded libPNG support to 1.6.37 (trac ticket 221) due to potential 
vulnerability

- upgraded Pixman support to 0.38.4
- upgraded Cairo support to 1.16.0
- rebuilt Poppler support
- upgraded HarfBuzz support to 2.5.3
- rebuilt libSVG support
- rebuilt libSVG-Cairo support
- updated cURL certificates bundle
- rebuilt mod_fcgid
- rebuilt Apache H264 Streaming Module
- upgraded osm2pgsql commandline utility to today’s git master
- rebuilt php_ogr extension
- upgraded Shapelib support to 1.5.0 (trac ticket 192)
- rebuilt shp2tile utility
- set “sys_temp_dir” in php.ini (trac ticket 204)
- upgraded APR support to 1.7.0
- added /Python/Scripts/ to PATH in setenv.bat (trac ticket 225)
- copied GDAL’s python module into /Apache/cgi-bin/ (trac ticket 223)
- and many more...

When installing, it is very important that (if you are using the .zip) 
your server must have the C++ Redistributable installed on it 
beforehand: execute the local file /ms4w/tmp/vcredist_x86.exe 
(alternatively if you use MS4W's setup.exe installer this is done 
automatically)


As always please provide your requests for enhancements and issues 
through the MS4W tracker (so the feedback is not lost or forgotten): 
https://ms4w.com/trac/  You can also contact me directly for support.


Thank you all for sharing your spatial information with MS4W !!

"MS4W: open doors and as well as windows"


-jeff




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

Re: [mapserver-users] Mapserver 7.4 on UbuntuGIS

2019-06-28 Thread Jan Hartmann

Ah, July-August, I see. I can wait for that. Thanks for the quick answers.

Jan

On 6/28/2019 3:59 PM, Angelos Tzotsos wrote:

Hi,

Packages now moved to UbunsutGIS Unstable.
We will move them to stable after OSGeoLive 13.0 release.

Best,
Angelos

On 6/26/19 12:37 PM, Jan Hartmann wrote:
Thanks, Angelos, that's fast, I'll keep an eye on it. Any idea when 
the stable version will be available? And, if possible, Docker images?


On 6/25/2019 11:37 PM, Angelos Tzotsos wrote:

Hi,

The package will move to Unstable ppa first (within the next few days).

Best,
Angelos

On 6/25/19 8:30 PM, Jan Hartmann wrote:

Hello all,

I saw Mapserver 7.4 on the UbuntuGis experimental page:

https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-experimental 



Any idea, when it will be available on UbunuGis stable, which still 
has only 7.2?


Jan Hartmann
Amsterdam
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users











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

Re: [mapserver-users] Mapserver 7.4 on UbuntuGIS

2019-06-26 Thread Jan Hartmann
Thanks, Angelos, that's fast, I'll keep an eye on it. Any idea when the 
stable version will be available? And, if possible, Docker images?


On 6/25/2019 11:37 PM, Angelos Tzotsos wrote:

Hi,

The package will move to Unstable ppa first (within the next few days).

Best,
Angelos

On 6/25/19 8:30 PM, Jan Hartmann wrote:

Hello all,

I saw Mapserver 7.4 on the UbuntuGis experimental page:

https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-experimental

Any idea, when it will be available on UbunuGis stable, which still 
has only 7.2?


Jan Hartmann
Amsterdam
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users





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

[mapserver-users] Mapserver 7.4 on UbuntuGIS

2019-06-25 Thread Jan Hartmann

Hello all,

I saw Mapserver 7.4 on the UbuntuGis experimental page:

https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-experimental

Any idea, when it will be available on UbunuGis stable, which still has 
only 7.2?


Jan Hartmann
Amsterdam
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Release date of Mapserver 7.2

2018-02-13 Thread Jan Hartmann

Hello folks,

Can anyone tell me when Mapserver 7.2 will be officially released? We 
are updating our servers, and would very much like to use PHP 7 and 
vector tiles.


Cheers,

Jan Hartmann
University of Amsterdam
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] PHP-mapscript: composite block in layer definition

2017-03-30 Thread Jan Hartmann

Hi folks,

Perhaps I overlooked something, but I don't see how to define a 
composite block within a layer with php-mapscript. In a regular mapfile 
it works beautifully (http://mapserver.org/mapfile/composite.html)


Regards,

Jan Hartmann
Amsterdam
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapserver 6.2.1 fails to read remote WMS in png format

2013-04-25 Thread Jan Hartmann


On 04/25/2013 04:26 PM, Daniel Morissette wrote:
What if you try to gdal_translate it to a TIFF or JPEG for instance? 
Please make sure you use the gdal_translate tool from the exact same 
MS4W package as what your MapServer is using.


Why should this be so, Daniel? I would expect to give gdal_translate the 
same results over different distros/architectures.


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


Re: [mapserver-users] Photo Viewer

2013-02-18 Thread Jan Hartmann
I do this by faking a WMS-service, with the pixel size of the scan as 
map boundaries, and using an arbitrary EPSG. It's primitive, but it 
works and I use it a lot, especially for large serieses of scans.


See:

http://mapserver.sara.nl/atlas/georef.html

Left the unreferenced scan, right the referenced maps, both zoomable 
independently. With a little elementary math, you can even align both 
maps (the sync buttons). You can even use it in QGIS or any other 
WMS-enabled program, e.g. to set reference points for warping or 
designing vector art work. Comments appreciated.


Jan

(file: utils.inc)

setProjection("init=epsg:$epsg");
$oMap->setMetaData("wms_title",$title);
$oMap->setMetaData("wms_srs","epsg:$epsg");
$oMap->setMetadata("wms_contactperson","Jan Hartmann");
$oMap->setMetadata("wms_contactorganization","University of 
Amsterdam");

$oMap->setMetadata("wms_contactelectronicmailaddress","j.l.h.hartm...@uva.nl");
$oMap->setMetadata("wms_enable_request","*");
$pwd = "http://mapserver.sara.nl/"; . $_SERVER["SERVER_NAME"];
$pwd = $pwd .  $_SERVER["PHP_SELF"];
if ($parms) $pwd = $pwd . "?$parms";
$oMap->setMetadata("wms_onlineresource",$pwd);
$l = ms_newLayerObj($oMap);
$l->set("name",$title);
$l->setProjection("init=epsg:$epsg");
$l->setMetadata("wms_title",$title);
$l->setMetadata("wms_srs","epsg:$epsg");
$l->set("status",MS_DEFAULT);
$l->set("type",MS_LAYER_RASTER);
$l->set("data",$data);
$ar = getSizeRaster($data);
$oMap->setExtent($ar[0],$ar[1],$ar[2],$ar[3]);
$oMap->setMetadata("wms_extent","$ar[0] $ar[1] $ar[2] $ar[3]");
$l->setMetadata("wms_extent","$ar[0] $ar[1] $ar[2] $ar[3]");
$oMap->setSize(600,600 * (($ar[3]-$ar[1]) / ($ar[2] - $ar[0])));
return($oMap);
}
function dispatchMap($oMap) {
$request = ms_newowsrequestobj();
$request->loadparams();
ms_ioinstallstdouttobuffer();
$oMap->owsdispatch($request);
$contenttype = ms_iostripstdoutbuffercontenttype();
if ($contenttype == "text/xml") {
header("Content-type: application/xml");
$buffer = ms_iogetstdoutbufferstring();
echo $buffer;
} else {
header("Content-type:$contenttype");
ms_iogetStdoutBufferBytes();
}
ms_ioresethandlers();
}
?>

The simplest WMS-service would be a PHP-script like

;
$oMap = createMapFromData("WMS_title",28992,"",$fn);
dispatchMap($oMap);
?>

The WMS-service would just be:

mywms.php


When you have a series of numbered scans in subdirectories, you could do:

;
$subdir = $_REQUEST["subdir"];
$nr = $_REQUEST["nr"];
$path = "$base/$subdir/scan_$nr.tif";
$oMap = createMapFromData("scan",28992,"subdir=$subdir&nr=$nr",$path);
dispatchMap($oMap);
?>

And accessl each scan as a WMS service like:

mywms.php?subdir=&nr=


On 02/14/2013 05:03 PM, Weisbender, Eric wrote:


I would like to use MapServer as just an unreferenced image viewer for 
jpgs so I can zoom in and out on the image. Everything I read says 
that images have to be georeferenced.  Any idea or even examples would 
be greatly appreciated.


Thanks,

Eric Weisbender



___
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] Displaying overlapping linestrings

2013-01-25 Thread Jan Hartmann
Yes, the idea works, but the differences in hue are too small to be 
useful in practice. And furthermore, they also show up for border lines 
between adjoining polygons. I just want to highlight polygons that 
completely overlap. I'm afraid I have to go the PostGIS/GEOS way.


Even o, would an XOR brush not be a nice addition to the STYLE object? 
You could create all kinds of moiré fill patterns.


http://www.google.nl/search?q=moire&hl=en&client=firefox-a&hs=lGh&tbo=u&rls=org.mozilla:en-GB:official&tbm=isch&source=univ&sa=X&ei=C1UCUez4C9KX0QXV9IDoDw&ved=0CFMQsAQ&biw=1600&bih=809

Jan

On 1/24/2013 6:36 PM, Lime, Steve D (DNR) wrote:


You could try drawing the features with the same base color but with 
opacity set. The more times the same area is rendered you'd get a 
different hue.


Steve

*From:*mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Jan 
Hartmann

*Sent:* Thursday, January 24, 2013 11:00 AM
*To:* Stephen Woodbridge
*Cc:* mapserver-users@lists.osgeo.org
*Subject:* Re: [mapserver-users] Displaying overlapping linestrings

On 01/24/2013 05:35 PM, Stephen Woodbridge wrote:

On 1/24/2013 11:13 AM, Jan Hartmann wrote:

Does anyone know a trick to do this:

I'm making geographical indexes for the map series in our map
library.
Each map sheets is displayed as a polygonal linestring, based on its
corner coordinates. Lots of sheets have exactly the same
boundaries, so
it's not clear where a polygon indicates just one map sheet of
several.
It's easy, of course, to write a PostGIS query to return a different
color code when map boundaries exactly coincide, but I was wondering
whether something like that could be done by mapserver on its own,
like
XOR-ing a line with what is already there. Any ideas?


Hi Jan,

For polygons you could use a small negative buffer to shrink the
polygon slightly. You can do this in postgis, and you might be
able to do it with mapserver if geos is compiled in. See:

http://mapserver.org/development/rfc/ms-rfc-48.html

No, that is not what I meant. I'm looking for a trick for mapserver to 
color a linestring differently when drawing over a linestring that it 
has already drawn in a previous layer. In computer graphics you can do 
this by using an XOR brush. Essentially, the screen frame buffer 
functions as a sort of memory. I don not want to use PostGIS or GOS, 
too complex. I doubt if this can be done by MapServer, but you never know.


Jan

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


Re: [mapserver-users] Displaying overlapping linestrings

2013-01-24 Thread Jan Hartmann


On 01/24/2013 05:35 PM, Stephen Woodbridge wrote:

On 1/24/2013 11:13 AM, Jan Hartmann wrote:

Does anyone know a trick to do this:

I'm making geographical indexes for the map series in our map library.
Each map sheets is displayed as a polygonal linestring, based on its
corner coordinates. Lots of sheets have exactly the same boundaries, so
it's not clear where a polygon indicates just one map sheet of several.
It's easy, of course, to write a PostGIS query to return a different
color code when map boundaries exactly coincide, but I was wondering
whether something like that could be done by mapserver on its own, like
XOR-ing a line with what is already there. Any ideas?


Hi Jan,

For polygons you could use a small negative buffer to shrink the 
polygon slightly. You can do this in postgis, and you might be able to 
do it with mapserver if geos is compiled in. See:


http://mapserver.org/development/rfc/ms-rfc-48.html

No, that is not what I meant. I'm looking for a trick for mapserver to 
color a linestring differently when drawing over a linestring that it 
has already drawn in a previous layer. In computer graphics you can do 
this by using an XOR brush. Essentially, the screen frame buffer 
functions as a sort of memory. I don not want to use PostGIS or GOS, too 
complex. I doubt if this can be done by MapServer, but you never know.


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


[mapserver-users] Displaying overlapping linestrings

2013-01-24 Thread Jan Hartmann

Does anyone know a trick to do this:

I'm making geographical indexes for the map series in our map library. 
Each map sheets is displayed as a polygonal linestring, based on its 
corner coordinates. Lots of sheets have exactly the same boundaries, so 
it's not clear where a polygon indicates just one map sheet of several. 
It's easy, of course, to write a PostGIS query to return a different 
color code when map boundaries exactly coincide, but I was wondering 
whether something like that could be done by mapserver on its own, like 
XOR-ing a line with what is already there. Any ideas?


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


Re: [mapserver-users] [mapserver-dev] MapServer 6.2 released

2012-11-14 Thread Jan Hartmann

Hi Steve, what on earth is GIS Day?

Congratulations with the new version, almost ten years after MapServer 
went really public at the first MapServer congres in Minneapolis!


Jan


On 11/14/2012 04:15 PM, Lime, Steve D (DNR) wrote:


And on GIS Day no less... nice timing. Fabulous work by all those that 
contributed code. A special shout out to Thomas for handling the 
release manager role. Thanks everyone!


Steve

*From:*mapserver-dev-boun...@lists.osgeo.org 
[mailto:mapserver-dev-boun...@lists.osgeo.org] *On Behalf Of *thomas 
bonfort

*Sent:* Wednesday, November 14, 2012 9:03 AM
*To:* MapServer Dev Mailing List; MapserverList OSGEO; osgeo-discuss 
(disc...@lists.osgeo.org)

*Subject:* [mapserver-dev] MapServer 6.2 released

The MapServer team is pleased to announce the release of MapServer 
6.2, along with the joint release of tinyOWS 1.1.0 and MapCache 1.0.0.


Details of the new features, migration instructions, and download 
links can be found on the dedicated announcement page at 
http://www.mapserver.org/development/announce/6-2.html .


cheers,

The MapServer PSC



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


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


Re: [mapserver-users] Mapfile VS MapScript performance

2012-11-07 Thread Jan Hartmann


On 11/07/2012 10:15 AM, thomas bonfort wrote:
- certain mapscript scripts will leak non trivial amounts of memory, 
forcing server restarts periodically if you don't have an infinite 
amount of memory available.



Hi Thomas, can you give more information about those memory leaks in 
MapScript?


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


[mapserver-users] Angle Auto with geomtransform arrows and small lines

2012-10-29 Thread Jan Hartmann

Hi,

I'm constructing maps of street segments with arrows at the endpoints to 
indicate the direction of the house numbers, using the "geomtransform  / 
angle auto" method described in 
"http://mapserver.org/mapfile/symbology/construction.html";. When zooming 
in, the arrow heads remain at the same size, while the street segments 
get smaller. This is as it should be, but when a street segments become 
smaller than the arrow-head, the direction of the arrow changes, as far 
as I can see at random. Shouldn't the direction of a symbol with "angle 
auto" always remain the same, regardless of the resolution of the map?


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


Re: [mapserver-users] Fwd: Constraining WMS output type

2012-03-12 Thread Jan Hartmann
"wms-getmap_formatlist" works, but if I specify "image/jpeg,image/png; 
mode=8bit,image/gif", qgis doesn't offer png as an output format 
anymore. It just doen't know 8-bits png. I saw they are working on it:


https://github.com/qgis/Quantum-GIS/commit/3a2c0e9872270fbd62d6bfcd9149d9d2a16c09cf

So, it's a qgis problem. The metadata item is nice to know, though.

Thanks,

Jan
On 03/12/2012 03:03 PM, Rahkonen Jukka wrote:

Hi,

I would have a try by defining a 8-bit png outputformat for img/png MIME type 
and using wms_getmap_formatlist in the metadata. How have you defined the png8 
now in your mapfile?

-Jukka Rahkonen-
____
Jan Hartmann wrote:



Hi all,
Is there a way to restrict the output types Mapserver offers as a WMS service, e.g. only 
png 8-bits? In QGIS, when I choose "png" as output for a WMS layer, I always 
get back png24 rasters, even if I explicitly specify png8 as outputtype in the mapfile.
Not sure if this would be according to the WMS specs, though.
Jan

___
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] Fwd: Constraining WMS output type

2012-03-12 Thread Jan Hartmann


Hi all,

Is there a way to restrict the output types Mapserver offers as a WMS 
service, e.g. only png 8-bits? In QGIS, when I choose "png" as output 
for a WMS layer, I always get back png24 rasters, even if I explicitly 
specify png8 as outputtype in the mapfile.


Not sure if this would be according to the WMS specs, though.
Jan

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


Re: [mapserver-users] Aligning labels within a polygon

2012-02-21 Thread Jan Hartmann

Going a step further:

st_longestline(st_collect(the_geom),st_collect(the_geom))

gives the longest line segment that can be drawn within the cluster of 
street address points. Works for non-curved streets. I'm still looking 
for a more intelligent way to thin out a polygon to a (multi)line.


Jan

On 02/21/2012 05:27 PM, Fawcett, David (MPCA) wrote:


If you are storing the data in PostGIS, you could possibly take 
advantage of ST_Azimuth(). http://www.postgis.org/docs/ST_Azimuth.html


It takes two point objects as the args, but you could potentially use 
the start and end points of your linestring.


David.

*From:*mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Jan 
Hartmann

*Sent:* Tuesday, February 21, 2012 10:23 AM
*To:* mapserver-users@lists.osgeo.org
*Subject:* [mapserver-users] Aligning labels within a polygon

Hi,

I'm inputting lots of street address points in PostGIS, and try to 
generate labels for the streets. The convex hull of the points of a 
street approximate the course of the street, and I would like to 
position the streetname in the middle of the convex hull polygon, 
aligned to its dominant angle (the polygons are generally quite 
narrow). Is there a way of doing this with MapServer? Perhaps by 
thinning out the polygon to a line, for then I can use "angle follow".


Jan

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


[mapserver-users] Aligning labels within a polygon

2012-02-21 Thread Jan Hartmann

Hi,

I'm inputting lots of street address points in PostGIS, and try to 
generate labels for the streets. The convex hull of the points of a 
street approximate the course of the street, and I would like to 
position the streetname in the middle of the convex hull polygon, 
aligned to its dominant angle (the polygons are generally quite narrow). 
Is there a way of doing this with MapServer? Perhaps by thinning out the 
polygon to a line, for then I can use "angle follow".


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


Re: [mapserver-users] Constraining label position

2012-02-20 Thread Jan Hartmann
That's it, thanks Thomas. It's a problem with the development version of 
OpenLayers, where during a map refresh the old version remains visible 
for some time next to the updated one, in order to get a smooth 
transition. I find intelligent labelpositioning more important than 
smooth transitions, so I'll suggest to them an option to disable the 
smoothing effect.


Jan

On 02/20/2012 03:30 PM, thomas bonfort wrote:

PROCESSING "LABEL_NO_CLIP=yes"

--
thomas

On Mon, Feb 20, 2012 at 15:27, Jan Hartmann  wrote:


On 02/14/2012 06:17 PM, Stephen Woodbridge wrote:

google: mapserver geomtransform

this will let you fix the label point to the centroid of the object or some
other positions.

The issue is that the label point is generally calculated based on the
geometry of the object as clipped to the view port. So the geometry changes
based on the view clipping and this causes the label point to also change.
the geomtransform works on the original data and so the label point becomes
fixed.


No I can't get this to work, perhaps I don't understand the syntax of
geomtransform. Can you give me an example of fixing a label to the center
point of a rectangle, without shifting it when the rectangle crosses the
viewport? My mapfile looks:

connectiontype postgis
connection ""
data the_rect from bnds
labelitem rect_id
style
   color 0 0 0
end
label
   color 0 0 255
end

I put a few geotransforms within the label and within the style objects, but
the label always shifts near the margin of the viewport.

Thanks,

Jan

___
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] Constraining label position

2012-02-20 Thread Jan Hartmann



On 02/14/2012 06:17 PM, Stephen Woodbridge wrote:

google: mapserver geomtransform

this will let you fix the label point to the centroid of the object or 
some other positions.


The issue is that the label point is generally calculated based on the 
geometry of the object as clipped to the view port. So the geometry 
changes based on the view clipping and this causes the label point to 
also change. the geomtransform works on the original data and so the 
label point becomes fixed.



No I can't get this to work, perhaps I don't understand the syntax of 
geomtransform. Can you give me an example of fixing a label to the 
center point of a rectangle, without shifting it when the rectangle 
crosses the viewport? My mapfile looks:


connectiontype postgis
connection ""
data the_rect from bnds
labelitem rect_id
style
  color 0 0 0
end
label
  color 0 0 255
end

I put a few geotransforms within the label and within the style objects, 
but the label always shifts near the margin of the viewport.


Thanks,

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


[mapserver-users] Constraining label position

2012-02-14 Thread Jan Hartmann

Hi,

The development version of Openlayers has a new facility: smooth tile 
transition. When panning, the old image remains visible for 2.5 seconds 
under the new one, so as to make the panning process smoother. This 
works fine for static maps, but gives undesired effects with MapServer 
labels. Those are computed anew for every request, so e.g. labels for 
items at the corner of the map get a different position, to keep them 
inside the displayed map. This results in old and new labels being 
displayed next to one another for some time.


Is there an option in MapServer to constrain the labels to always have 
the same position respective to the geometry they are labeling?


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


Re: [mapserver-users] Can't get 8-bit palette output

2012-01-19 Thread Jan Hartmann
I see. Just for curiosity: why was png/gd dropped and wouldn't it be an 
idea to add an option to generate automatically a palette for png 8? 
Paletted output is still very useful for choropleth maps.


Jan

On 01/03/2012 04:05 PM, Lime, Steve D (DNR) wrote:


GD is for GIF only in 6.0+. To get paletted output you can set:

-IMAGETYPE GIF (GD-based)

-IMAGETYPE PNG (AGG 8-bit)

-Setup an output format with like Rich G. mentioned

-Setup an output format that forces use of a pre-defined palette

OUTPUTFORMAT

NAME png8

DRIVER "AGG/PNG"

MIMETYPE "image/png"

IMAGEMODE RGB

EXTENSION "png"

FORMATOPTION "INTERLACE=OFF"

FORMATOPTION "PALETTE_FORCE=TRUE"

FORMATOPTION 
"PALETTE=/usr/local/mapserver/apps/mr/compass/compass.palette"


END

Steve

*From:*mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Jan 
Hartmann

*Sent:* Monday, January 02, 2012 10:45 AM
*To:* mapserver-users@lists.osgeo.org
*Subject:* [mapserver-users] Can't get 8-bit palette output

Happy New Year, all.

I'm porting my applications from MapServer 5.7 to 6.0.1, and I am 
unable to get 8-bit palette output. The MapScript commands are:


$oMap->outputformat->set('driver','GD/PNG');
$oMap->outputformat->set('imagemode',MS_IMAGEMODE_PC256);

which give me the following warning, and no image:

*Warning*: mapObj::draw() [mapobj.draw 
<http://mapserver.sara.nl/calligo/zl/maps/k1832/mapobj.draw>]: 
[MapServer Error]: agg2CreateImage(): AGG2 driver only supports RGB or 
RGBA pixel models


I tried every combination I coud think of, with GIF and GDAL, and got 
always the same result. MapServer was compiled with gd-support:


MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG 
SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER 
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS 
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


Any idea, someone?

Jan

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


[mapserver-users] Can't get 8-bit palette output

2012-01-02 Thread Jan Hartmann

Happy New Year, all.

I'm porting my applications from MapServer 5.7 to 6.0.1, and I am unable 
to get 8-bit palette output. The MapScript commands are:


$oMap->outputformat->set('driver','GD/PNG');
$oMap->outputformat->set('imagemode',MS_IMAGEMODE_PC256);

which give me the following warning, and no image:

*Warning*: mapObj::draw() [mapobj.draw 
]: 
[MapServer Error]: agg2CreateImage(): AGG2 driver only supports RGB or 
RGBA pixel models


I tried every combination I coud think of, with GIF and GDAL, and got 
always the same result. MapServer was compiled with gd-support:


MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


Any idea, someone?

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


Re: [mapserver-users] Hiding scale dependant layers in WMS GetCapabilities

2011-09-13 Thread Jan Hartmann
Got a solution for this question from an answer by Flavio Hendry on the 
German mailing list to a slightly different question: use UNION layers, 
a "new and exciting" (indeed!) item of MapServer 6. Just add 
"ows_enable_request" "!GetCapabilities" to the WMS metatdata of layers 
you want to hide, create a single UNION layer with all those layers in 
the "connection" , and set that layer's metadata to "ows_enable_request" "*"


http://freegis.org/pipermail/mapserver-de/2011-September/004477.html
http://freegis.org/pipermail/mapserver-de/2011-September/004479.html

Jan


On 09/10/2011 01:44 PM, Jan Hartmann wrote:

Hi folks,

Is the following possible:  I have a MapFile with  a few groups, each 
consisting of multiple layers that are displayed dependent on the 
chosen scale. I want to display only the group names in the 
GetCapabilities request, and according to


http://mapserver.org/trunk/development/rfc/ms-rfc-67.html#rfc67

this can be done  with the "ows_enable_request" directive. I have 
tried different combinations of "ows_enable_request *" and 
"ows_enable_request !getcapabilities" in the web- and layer metadata, 
but I get either GetCapabilities for all layers, or for none at all. 
How can I get the GetCapabilities of all groups and nothing more?


Jan


___
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] Hiding scale dependant layers in WMS GetCapabilities

2011-09-10 Thread Jan Hartmann

Hi folks,

Is the following possible:  I have a MapFile with  a few groups, each 
consisting of multiple layers that are displayed dependent on the chosen 
scale. I want to display only the group names in the GetCapabilities 
request, and according to


http://mapserver.org/trunk/development/rfc/ms-rfc-67.html#rfc67

this can be done  with the "ows_enable_request" directive. I have tried 
different combinations of "ows_enable_request *" and "ows_enable_request 
!getcapabilities" in the web- and layer metadata, but I get either 
GetCapabilities for all layers, or for none at all. How can I get the 
GetCapabilities of all groups and nothing more?


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


Re: [mapserver-users] Line numbers of error messages in mapfiles with includes

2011-09-08 Thread Jan Hartmann
Tanks Steve, not necessary. Better spend my time on updating everything 
to 6 ...


Jan

On 09/08/2011 04:22 PM, Steve Lime wrote:

Changes are restricted to maplexer.l if you felt the need to patch
5.7. Let me know if you need assistance...

Steve

On Thu, Sep 8, 2011 at 3:39 AM, Jan Hartmann  wrote:

Yes, it was under 5.7. I tested it under 6 and there it works OK.

Thanks,

Jan

On 09/07/2011 09:52 PM, Steve Lime wrote:

Which version are you using? For some reason I thought this was in
place in the 6.0 release.

Steve

On Wed, Sep 7, 2011 at 8:29 AM, Jan Hartmann  wrote:

Sometimes it's difficult to find the location of an error in a Mapfile, when
that Mapfiles includes another Mapfile. In that case the line number is that
of the combined files. Would it be possible to set the line-counter to the
actual file Mapserver is parsing?

Jan

___
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] Line numbers of error messages in mapfiles with includes

2011-09-08 Thread Jan Hartmann

Yes, it was under 5.7. I tested it under 6 and there it works OK.

Thanks,

Jan

On 09/07/2011 09:52 PM, Steve Lime wrote:

Which version are you using? For some reason I thought this was in
place in the 6.0 release.

Steve

On Wed, Sep 7, 2011 at 8:29 AM, Jan Hartmann  wrote:

Sometimes it's difficult to find the location of an error in a Mapfile, when
that Mapfiles includes another Mapfile. In that case the line number is that
of the combined files. Would it be possible to set the line-counter to the
actual file Mapserver is parsing?

Jan

___
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] Line numbers of error messages in mapfiles with includes

2011-09-07 Thread Jan Hartmann
Sometimes it's difficult to find the location of an error in a Mapfile, 
when that Mapfiles includes another Mapfile. In that case the line 
number is that of the combined files. Would it be possible to set the 
line-counter to the actual file Mapserver is parsing?


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


Re: [mapserver-users] Layer rendering performance problem

2011-05-12 Thread Jan Hartmann
About the GD library: the dowload site (http://www.boutell.com/gd/) is 
down, and there is no indication how long this will be so. There is a 
link to the code repository, but no standard tar-file is to be found 
there. Since MapServer cannot be compiled without GD, would it make 
sense to provide a tarball on mapserver.org?


Jan

On 05/11/11 22:39, Lime, Steve D (DNR) wrote:

I believe GD had its own font caching built in or it used some Freetype 
constructs. I never wrote it...

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of thomas bonfort
Sent: Wednesday, May 11, 2011 11:10 AM
To: Jon-Paul Dobson
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Layer rendering performance problem

what mapserver version and renderer/driver are you using?

AGG should'nt be accessing the font file unless a new character is
encountered. For GD I don't know.

--
thomas

On Wed, May 11, 2011 at 18:00, Jon-Paul Dobson  wrote:

Thanks guys. I will give this ago. Any ideas about poor performance when
using a true type font? Why does MapServer need to load the .ttf file each
time to draw a symbol. Surely the ttf file should be cached?

Rgards,
Jon-Paul.

On Wed, May 11, 2011 at 4:54 PM, Jeff McKenna
  wrote:

On 11-05-11 12:47 PM, Jon-Paul Dobson wrote:

Hi Jukka,
Thanks for getting back to me so quickly. No I haven't tried this. How
is this done and what is the benefit? Aren't Shape files already indexed?
Regards,
Jon-Paul.

Jukka is right, always make sure to run the shptree commandline utility on
all of your ESRI shapefiles before using them in MapServer
(http://mapserver.org/utilities/shptree.html).  You'll see huge speed
differences.

-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.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 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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE: Validation beyond [A-z]

2011-04-29 Thread Jan Hartmann

Thanks Steve. I don't understand the syntax: in the regex versions I use, "." means 
"one and just one character", not any string.
Any string excluding the null-string would be ".+" or "..*"

More generally, I still have problems with validation as a concept: it's too 
difficult, and perhaps that's why it isn't documented.
I have postings about this subject in my personal mapserver-dev mail-archive 
dating from 2002
(couldn't find them on the official site any more), and there still isn't a 
clear solution almost ten years later.

IMHO the major security risk of MapServer CGI is that it gives access to the 
filesystem outside the web-root. Wouldn't it be better to keep security at that 
level,
i.e. only let MapServer access explicitly defined parts of the filesystem? 
Within these parts, it's up to the web-site builder to put only those things 
that should be
visible and nothing else. You don't put an ultra-secret document on the web and 
afterward restrict access to portions only, you just put there what you want to 
show
to the world. Same goes for validations on extent or styles: just make your selections of 
what you want to show "before" you let MapServer loose on it.

The same story can be told for database access and restrictions on SQL queries: 
IMHO that is a matter for the database system.
It's easy enough to put everything behind barriers with user privileges and 
views. Why should mapserver double all that security?
Any competent database administrator should know how to prevent SQL injects,
and MapServer should not be there to protect those who are unable to.

I've been working with Cloud VM's for about a year now, and in that environment 
many security problems disappear: just make small, dedicated
servers and interconnect them, e.g. with cascading services.

So my view would be: let the Operating System and the Database do everything 
needed to secure files and databases, and put in your web services only 
afterwards.
It all gets too complex with all those interconnected securities at all levels 
of the system (my main problem with Apache).

In the last ressort: KISS (Keep It Simple Steve (whoever)) :-)

Jan


-

On 04/28/11 18:48, Steve Woodbridge wrote

Hi Jan,

I do not think there is a global OFF switch for validation, but where
validation is required you can include the regex validation string of
/./ which means match anything except a null string, or to also accept a
null string then use /.*/

You still need to be aware of when you should put a validation in place
even if it accepts any string.

Regards,
   -Steve W



On 04/28/11 18:48, Jan Hartmann wrote:
I find the whole validation issue difficult and not well documented 
(http://trac.osgeo.org/mapserver/ticket/3754, last updated four hours 
ago). How do I put all validation off? I really don need that much 
security.


Jan

On 04/28/11 18:19, Lime, Steve D (DNR) wrote:


I see the problem, just not sure how to fix it. Steve W. provided 
some possibilities but that's probably not the only approach. It 
would be helpful if some interested person(s) got together and 
drafted an RFC. I think the devs would be in a position to help 
define implementation details if the problem is well defined along 
with a proposed solution.


Steve

*From:*mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of 
*Rahkonen Jukka

*Sent:* Thursday, April 28, 2011 4:21 AM
*To:* mapserver-users@lists.osgeo.org
*Subject:* [mapserver-users] Validation beyond [A-z]

Hi,

Validation is nowadays needed in quite a many places in a mapfile.  
However, we who live outside the English speaking world tend to have 
more characters in the alphabet than A to Z.  This makes the mapfile 
validation idea only half effective because for making things to work 
at all with the native data we must accept almost everything that is 
non-numeric with wildcards. Are there others who think that this is a 
problem?


Stephen Woodbidge commented slightly this topic in another thead a 
month ago (Mar 29, 2011)


http://lists.osgeo.org/pipermail/mapserver-users/2011-March/068307.html

-Jukka Rahkonen-


___
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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE: Validation beyond [A-z]

2011-04-28 Thread Jan Hartmann
I find the whole validation issue difficult and not well documented 
(http://trac.osgeo.org/mapserver/ticket/3754, last updated four hours 
ago). How do I put all validation off? I really don need that much security.


Jan

On 04/28/11 18:19, Lime, Steve D (DNR) wrote:


I see the problem, just not sure how to fix it. Steve W. provided some 
possibilities but that's probably not the only approach. It would be 
helpful if some interested person(s) got together and drafted an RFC. 
I think the devs would be in a position to help define implementation 
details if the problem is well defined along with a proposed solution.


Steve

*From:*mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of 
*Rahkonen Jukka

*Sent:* Thursday, April 28, 2011 4:21 AM
*To:* mapserver-users@lists.osgeo.org
*Subject:* [mapserver-users] Validation beyond [A-z]

Hi,

Validation is nowadays needed in quite a many places in a mapfile.  
However, we who live outside the English speaking world tend to have 
more characters in the alphabet than A to Z.  This makes the mapfile 
validation idea only half effective because for making things to work 
at all with the native data we must accept almost everything that is 
non-numeric with wildcards. Are there others who think that this is a 
problem?


Stephen Woodbidge commented slightly this topic in another thead a 
month ago (Mar 29, 2011)


http://lists.osgeo.org/pipermail/mapserver-users/2011-March/068307.html

-Jukka Rahkonen-


___
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] Error Message in WMS service

2011-04-08 Thread Jan Hartmann

Ah, I knew it was a beginner's question. Thanks Michael.

Jan

On 8-4-2011 18:36, Smith, Michael ERDC-CRREL-NH wrote:

Jan,

In the options to OpenLayers WMS layer, you set the ratio: 1 and OpenLayers
will not request outside of the visible screen area.

Mike



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


Re: [mapserver-users] Error Message in WMS service

2011-04-08 Thread Jan Hartmann
No, that doesn't work. It's an OpenLayers application, so the WMS 
request automatically computes an extent in excess of the screen. The 
second solution is really a bit of a kludge, don't you think so? :-)


I use another kludge: handle the complete WMS request via PHP Mapscript: 
return a an XML file for a GetCapabilities request, and an image for 
everything else (http://mapserver.org/ogc/mapscript.html). This will not 
cover the complete WMS protocol, but works fine for simple map requests, 
both in OpenLayers, ArcGIS, MapInfo and QGis. And it gives me at least 
complete control over error handling, with GD-produced error images at 
the right position. It's the only way I am aware of to produce WMS 
output that can be debugged easily.


Jan

On 8-4-2011 16:34, Lime, Steve D (DNR) wrote:

Or limit the size of the WMS request to the viewport size (ratio:1). I would 
think that would be desirable regardless IMHO. Other option is to generate 
longer error messages with really long layer names. ;-)

Steve

-Original Message-
From: Jan Hartmann [mailto:j.l.h.hartm...@uva.nl]
Sent: Friday, April 08, 2011 9:31 AM
To: Lime, Steve D (DNR)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Error Message in WMS service

OK, that means that I have to create an error image the size of the WMS
request and position the message in the middle, with some combination of
PHP Mapscript and PHP/GD. Doable.

Thanks,

Jan

On 8-4-2011 16:27, Lime, Steve D (DNR) wrote:

Looking at the code it's always in the same place, so no...

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jan Hartmann
Sent: Friday, April 08, 2011 9:21 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Error Message in WMS service

Hi folks, just a beginner's question:

Is it possible to position the image-error message of a WMS request in
the middle of the image? Normally it is placed in the upper left corner,
and with OpenLayers (overlaid over Google Maps) the message is displayed
on a tile outside the visual screen.

Jan
___
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] Error Message in WMS service

2011-04-08 Thread Jan Hartmann
OK, that means that I have to create an error image the size of the WMS 
request and position the message in the middle, with some combination of 
PHP Mapscript and PHP/GD. Doable.


Thanks,

Jan

On 8-4-2011 16:27, Lime, Steve D (DNR) wrote:

Looking at the code it's always in the same place, so no...

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jan Hartmann
Sent: Friday, April 08, 2011 9:21 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Error Message in WMS service

Hi folks, just a beginner's question:

Is it possible to position the image-error message of a WMS request in
the middle of the image? Normally it is placed in the upper left corner,
and with OpenLayers (overlaid over Google Maps) the message is displayed
on a tile outside the visual screen.

Jan
___
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] Error Message in WMS service

2011-04-08 Thread Jan Hartmann

Hi folks, just a beginner's question:

Is it possible to position the image-error message of a WMS request in 
the middle of the image? Normally it is placed in the upper left corner, 
and with OpenLayers (overlaid over Google Maps) the message is displayed 
on a tile outside the visual screen.


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


Re: [mapserver-users] RE: making POINT with SQL

2011-04-08 Thread Jan Hartmann

Didn't I hear this advice before on this list :-)

Jan

On 7-4-2011 21:49, Lime, Steve D (DNR) wrote:


Make sure you're actually turning the layer on. Status ON always makes 
me wonder. Try setting STATUS to DEFAULT and comment out the maxscale 
line and see what happens.


Steve

*From:*mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Juan 
Carlos Monestel

*Sent:* Thursday, April 07, 2011 1:21 PM
*To:* mapserver-users@lists.osgeo.org
*Subject:* [mapserver-users] RE: making POINT with SQL

Hi
it is not drawing and no error occurs




-Original Message-
From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us]
Sent: Thu 4/7/2011 2:43 PM
To: Juan Carlos Monestel; mapserver-users@lists.osgeo.org
Subject: RE: making POINT with SQL

What does "not working" mean? Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Juan 
Carlos Monestel

Sent: Thursday, April 07, 2011 12:04 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] making POINT with SQL


Hello
I'm trying to make an POINT in the map but it's not working

this is my Layer
layer
name "ponto"
connectiontype POSTGIS
connection "dbname= user=x host=x port=x"
data "geo_info from table"
type point
status on
metadata
tile_source "nocache"
end
maxscale 301
class
style
size 4
symbol "circulo"
color 0 0 0
end
style
size 1
symbol "circulo"
color 255 255 255
end
end
end


The SQL brings me an geo info 
("010120E61079E9263108DC42C08716D9CEF75338C0") that in text is 
= "POINT(-37.719 -24.328)"



Any Ideas ?


___
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] Projection problems

2011-01-08 Thread Jan Hartmann



On 01/07/11 20:57, Frank Warmerdam wrote:

On 11-01-07 02:40 PM, Jeff McKenna wrote:

On 11-01-07 10:49 AM, Jan Hartmann wrote:


Yes, the transformation to WGS84 for the Dutch coordinate system
("Amersfoort", "Rijksdriehoeksnet) is still *not* part of the latest
PROJ4 release (4.7.0, downloaded yesterday).


I have requested many changes to the EPSG 'geodetic dataset' 
throughout the

years, so maybe I can give you some advice:

- enter your change request through a form on the EPSG site:
http://www.epsg.org/Comms/Comment.asp
- it may take upto one year for the change to be accepted by the EPSG 
group and

included in the next EPSG geodetic dataset
- you will get an email from the EPSG group once that happens
- however it will take much longer for software that uses EPSG codes 
to update
their own releases with those new EPSG codes (this includes PROJ, 
QGIS, MS4W,

etc.)

Hope that sheds some light on the issue for you.


Jeff,

I think Jan's concern is that the transformation does exist in EPSG but
is not reflected in the last PROJ.4 release.  I believe this is fixed
in CVS and I really just need to push out a new PROJ.4 release reasonably
soon.

Jan - I'd appreciate it if you could confirm that:

  http://svn.osgeo.org/metacrs/proj/trunk/proj/nad/epsg

has the right value.

Best regards,


Hi Jeff, Frank,

Yes that was indeed the issue. The problem is that the EPSG database 
*does* have the WGS84 transform for EPSG 28992, but gives a whopping six 
possibilities, without offering a good explanation what they amount to. 
That's why the automatic retrieval by PROJ of those parameters from the 
EPSG database doesn't work too well for this EPSG number.


The parameters in SVN are not the most recent ones: see 
http://trac.osgeo.org/geotiff/ticket/22 for the right numbers, and the 
attached spreadsheet for the way they were computed. Both series result 
in almost the same ground positions (differences of a few centimeters), 
so it doesn't matter much in practice whether you adapt SVN by hand or 
not. Of course it would be better to have just one set of parameters 
available everywhere. I have always wondered why there is nowhere an 
official Dutch site were this matter is kept up to date in an 
easy-to-understand way. To translate Milo's Dutch proverb, everyone 
seems to fish in his own pond over here.


By the way, I have the impression that the method by which the WGS84 
shifts are retrieved from the EPSG database and put into PROJ is not 
100% robust, so perhaps this could be looked into too.


I hadn't realised that PROJ is so stable by now that new releases take 
so long to appear. Sorry if I sounded a bit grumpy; to quote Milo again, 
this problem has plagued Open Source GIS people in Holland for years.


Thanks,

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


Re: [mapserver-users] Projection problems

2011-01-07 Thread Jan Hartmann
(Sorry for crossposting to the PROJ list, but this has been a problem 
for years going)


Yes, the transformation to WGS84 for the Dutch coordinate system 
("Amersfoort", "Rijksdriehoeksnet) is still *not* part of the latest 
PROJ4 release (4.7.0, downloaded yesterday). You need to change the 
formula for epsg:28992 in PROJ's epsg table and in PosGIS's 
"spatial_ref_sys" table, like Milo describes, else your maps will be 
about 100 meters off. You can read an extensive discussion about this, 
including an Excel spreadsheet to compute the towgs84 parameters from 
the official EPSG database at:


http://trac.osgeo.org/geotiff/ticket/22

PROJ gets its parameters from EPSG, but somehow it still doesn't manage 
to include the WGS84 transform.


Vriendelijke groeten,

Jan



On 01/07/11 15:22, Milo van der Linden wrote:

Funny,

Everytime I read "projection problems" on this list I think: Hey, this 
might be someone from the Netherlands.



You mean you would really like to have your bedrijventerreinen like this?

http://www.locatiemonitor.nl/LocationDetails2.aspx?lid=1437

(please wait for the bedrijventerreinen wms to appear)

I created the wms service for locatiemonitor and as I can see, we are 
"fishing in the same vijver"


Please read my blog post at 
http://blog.dogodigi.net/2010/08/19/dutch-coordinate-system-ellipsoid-correction/


And write a small thank you comment if it helped you solve your issue

;-)

Kind regards,

Milo van der Linden

2011/1/7 basvmrs mailto:b...@cipix.nl>>


Hi,

I've created a map server in which I try to output data that was
entered
using Google Maps V2 (drawing polygons). I used openlayers to
display the
results over a Bing layer.

There seems to be a problem in the projection, which is best
described using
an image and a link:

http://bir.cipixtest.nl/resources/gis/demo.html Demo
http://osgeo-org.1803224.n2.nabble.com/file/n5898717/forum.png

Notice how the areas seem to 'shift' when zooming in.

My mapfile looks like this:


#
# Start of map file
#
MAP
   NAME BIR
   STATUS ON
   SIZE 600 600
   EXTENT 4.4 51.85 4.6 51.95
   UNITS METERS

   IMAGETYPE PNG

   PROJECTION
   "init=epsg:900913"
   END

   TRANSPARENT ON

   LAYER
   NAME bedrijventerreinen
   TYPE POLYGON
   STATUS DEFAULT
   CONNECTIONTYPE OGR
   CONNECTION
"MySQL:bir,host=X,user=X,password=XXX,port=3306"
   DATA "SELECT * from gis_object"
   DUMP TRUE
   CLASS
   NAME 'Bedrijventerreinen'
   STYLE
   OUTLINECOLOR 0 0 0
   COLOR 200 200 200
   END
   END
   TEMPLATE "object.html"

   METADATA
   gml_include_items "all"
   WMS_TITLE "Bedrijventerreinen"
   WMS_ABSTRACT "Bedrijventerreinen in de
Regio Rotterdam; de gebieden zijn
een benadering en er kunnen geen rechten aan worden ontleend."
   WMS_SRS "EPSG:28992 EPSG:900913 EPSG:4326"
   END
   END

END # Map File

I don't have a clue why this is happening. I hope that someone can
explain
to me why this is happening and how to fix it.

Kind regards,
Bas
--
View this message in context:

http://osgeo-org.1803224.n2.nabble.com/Projection-problems-tp5898717p5898717.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



___
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] Re: Clipping returned WFS data to the requesting bounding box

2010-12-02 Thread Jan Hartmann



On 2010-12-02 6:04, Lime, Steve D (DNR) wrote:

  I'd advocate binding a few variables like extent and scale to expressions 
with a special syntax. For example, [_minx] or something like that. RFC 64 
makes it much easier to extend expressions like this.

I would certainly like to have that. If I remember well, there has been 
a discussion about this long ago, but people thought it was too 
difficult to implement back then, because it would require two passes 
through the data. Being able to request things like extent and bounding 
box directly from a template pattern, at the same time as the actual map 
request, would simplify MapServer's query logic a lot.


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


Re: [mapserver-users] Re: Clipping returned WFS data to the requesting bounding box

2010-11-29 Thread Jan Hartmann



On 2010-11-29 22:11, Lime, Steve D (DNR) wrote:

I'm not aware of any means to do this. If you're using PostGIS perhaps there's 
a way to use the !BOX! hack in conjunction with some of the analytical 
functions but it's a long shot... (see 
http://www.mail-archive.com/mapserver-us...@lists.umn.edu/msg03006.html)




Quoting Paul Ramsey in the link above:
 
"

the evil "!BOX!" hack: In your data statement, if you compose it thusly:

DATA "the_geom from (select gid,the_geom from thetable where the_geom
&&  !BOX!) using unique gid"

When the postgis driver encounters the evil !BOX! it will replace it
with the current mapserver bounding box.
"

What exactly is the status of this demonic !BOX! hack? Is it described somewhere? Is the 
"current mapserver bounding box" queryable within MapServer itself?

Jan




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


Re: [mapserver-users] Gauss-Krüger

2010-11-16 Thread Jan Hartmann
If your map is from 1908, there is a change that its projection is not 
in the official modern EPSG table. In that case you need to derive the 
whole PROJ4 definition from the legend of the map. As a rule, this is 
not difficult, as the theoretical definitions of the common projection 
have been known for a long time, it's just a matter of discovering which 
particular set of parameters has been chosen for this map. In my 
experience with old Dutch maps the main difficulty is finding out which 
ellipsoid has been used. In your case, a map of 1908 can in no way have 
had a WGS84 datum. You probably have to project it to a modern 
projection with the original ellipsoid, and from that to WGS84.


Can you give any details of the maps you are working with and whether 
their legends say something said about the projection? Are they part of 
a larger map series?


Jan

On 11/16/10 12:02, Daiane Fraga wrote:

Hi,

I understand what you say. But this is not my question. I'm with a map 
in a coordinate system outdated (the maps are dated from 1908). And 
I'm using an application that interacts with Google Maps, which has 
caused problems. Did you know how to do some kind of conversion from 
the Mapserver?
We can do a conversion to the WGS 1984, but it has to be done manually 
for each map.

I'm not sure that may maps have a known Mapserver projection.

I'm using this:
PROJECTION
"init=epsg:26915"
"proj=latlong"
"ellps=WGS84"
"datum=WGS84"
END


Thanks!

Daiane Fraga




-- Forwarded message --
From: *Fuchs Juan Carlos* >

Date: 2010/11/12
Subject: RE: [mapserver-users] Gauss-Krüger
To: Daiane Fraga >



Hi Daiane
You have to find in Prij.4 the right EPSG code for your maps
in wich country / region are you interested?
yust to sart with ...
in the .map you have to insert two groups of code
in the header (first zone) goes the poyection of the map you are producing
PROJECTION
  "init=epsg:heregoesyourcode"
END
for each Layer you call to build the map
Layer

PROJECTION
  "init=epsg:heregoesyourcodeof thesourcelayer"
END

end
hope it help someway
Cheers
JC

-Mensaje original-
*De:* Daiane Fraga [mailto:daiane.a.fr...@gmail.com
]
*Enviado el:* Viernes, 12 de Noviembre de 2010 12:03 p.m.
*Para:* mapserver-users@lists.osgeo.org

*Asunto:* [mapserver-users] Gauss-Krüger

Hello,

Did someone have any problems using Mapserver with Gauss-Krüger?
I know that Mapserver is compatible with proj.4 library and the
proj.4 library supports Gauss-Krüger. But I dont know how to use it.
Somebody could help me?

Thanks.

Daiane




___
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] Shell-script to compile MapServer in a user directory tree

2010-10-08 Thread Jan Hartmann

 Hi all,

The last few months I have been working in a Cloud environment with lots 
of virtual machines, all with MapServer, PostGIS and PL/R. I couldn't 
work with binaries, since different sites needed different 
configurations. It's not difficult to compile MapServer once you have 
done it a few times, but it becomes boring if you need to do it dozens 
of times. So I made a shell-script that on the one hand compiles the 
whole MapServer-PostGIS-PLR suite with one command, but leaves the 
possibility to adapt every configuration parameter. Everything is done 
at the user level: no super user rights are needed, no system files are 
changed, and the whole installation takes place within a single 
directory tree. Multiple installations can coexist on the same 
computer.  You can find it, together with instructions, at:


http://mapserver.sara.nl/Install

I tried out four different configurations on dozens of virtual machines, 
installed from standard distribution DVD's: Debian, Fedora, Suse and the 
OSGEO Live CD (Xubuntu) , so I'm reasonably sure it works on fresh, 
modern installation. Older and much-used systems could give trouble, 
although I don't expect many problems there either. Let me know if this 
is useful for you and how it could be  ameliorated.


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


Re: [mapserver-users] RE: CGI returning a 502 error

2010-09-22 Thread Jan Hartmann
 Wasn't there a similar problem about the hard-coded maximum number of 
classes a few years ago? That problem was solved, if I remember 
correctly. Wouldn't it be a good idea to take that solution over to the 
number of CGI parms? The problem won't turn up often, but if it does it 
is hard to detect, and as far as I can see it's not hard to solve.


Jan

On 09/22/10 20:56, Lime, Steve D (DNR) wrote:

Yes, there is a preset limit on the number of parameters the MapServer cgi will 
accept and indeed it is 100. There are two ways to work around this.

1) Edit the MS_MAX_CGI_PARAMS setting in cgiutil.h and recompile.
2) Consider combining the requested layers calls into a single variable. That 
is:

Change
   ...layer=layer1&layer=layer2&layer=layer3...
to:
   ...layers=layer1+layer2+layer3...

You should see an error message from MapServer in your web server error log if 
you ran into this limitation...

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli
Sent: Tuesday, September 21, 2010 11:19 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] RE: CGI returning a 502 error


I do not think it is a string length limit. The IIS returns a separate error
for that. At least it does when you exceed the URL length limit in a GET
request.

I have been doing some tests and it looks like it might be more of a limit
in the number of parameters in the POST request. I can't find any info
regarding the maximum number of parameters that you can send in one request
(to an IIS server), but again, I would think that IIS would be responding
with a more specific error if the limit was with it.

Is it possible that the MapServer CGI is limited to 100 POST parameters?

Fawcett, David (MPCA) wrote:

According to the docs, starting with MapServer 5.0, there is no limit to
the number of layers in a mapfile.
http://mapserver.org/introduction.html#layer-object

I am guessing that you are running into a different issue.

Have you captured the post request string and examined it to make sure
that it is valid?

Are you running into a string length limit for your post request?  The URL
for your post request would be limited to ~2k char for IE, but this only
includes the URL to the server, not the key:value pairs.  There could be a
size limit for post requests set on your Web server to help prevent DOS
attacks.  I don't know where this would be set in IIS.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli
Sent: Monday, September 20, 2010 6:18 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] CGI returning a 502 error


I'm using the ms4w binaries (5.6.3) under IIS 7.

My application sends (via http POST) a lot of parameters to modify the
.map
file. Mostly to add features to layers that are turned off by default and
then make them visible. When my parameters cause the map to show over 50
layers, the IIS returns a 502 error.

I realize that the max layers are set to 100 in the default map.h file,
but
like I said, I am using the compiled binaries from ms4w. Does anyone know
if
they change that to 50 when they compile, or should I look elsewhere to
find
my problem?


--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/CGI-returning-a-502-error-tp5552675p5552675.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


___
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] Re: Output geospatial PDFs

2010-09-21 Thread Jan Hartmann

 Ah, they are going to support PDF via Cairo. Good. Hadn't understood that.

Jan

On 09/21/10 16:21, Stephen Woodbridge wrote:

On 9/21/2010 10:15 AM, Jan Hartmann wrote:

  Is this so?


Yes, this came across the list a while back:
http://osgeo-org.1803224.n2.nabble.com/SVG-PDF-and-Flash-output-in-MapServer-6-0-td5518649.html 



The dev team is refactoring the rendering engine to make it more 
consistent across renderers and to stream line it and add support for 
some additional rendering solutions. A lot of changes happening in 
this area.


-Steve W


Jan

On 09/21/10 15:58, Sumit Sharma wrote:
One more thing... Stick to Cario renderer instead PDF in Mapserver. 
As I

understand support for PDF may discontinue from 6.0 release.
-Sumit



___
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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Re: Output geospatial PDFs

2010-09-21 Thread Jan Hartmann

 Is this so?

Jan

On 09/21/10 15:58, Sumit Sharma wrote:

One more thing... Stick to Cario renderer instead PDF in Mapserver. As I
understand support for PDF may discontinue from 6.0 release.
-Sumit
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] mapserv -v as html

2010-09-08 Thread Jan Hartmann

 Hi,

Is there a simple way to do a browser request for "mapserv -v"? If I 
type an URL like "http://localhost/cgi-bin/mapserv?-v"; I get an Internal 
Server Error, because this way mapserv doesn't return HTTP headers.


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


Re: [mapserver-users] thread safety and php and fastcgi

2010-09-03 Thread Jan Hartmann



On 09/02/10 16:03, Frank Warmerdam wrote:


In the case of FastCGI the fastcgi mapserver process is only given one
cgi request at a time to handle.  It won't be given another until the
previous one is complete.  Apache can start multiple separate FastCGI
MapServer instances in order to handle multiple requests at once but
they each have their own process.  So, FastCGI does not have
multi-threading issues.  It does occationally run into issues with
memory leaks or "left over state" from a previous cgi request.


What about mod_fcgid and mod_python? Are they thread-safe too running 
MapServer and MapScript scripts? Reading the PHP-MapScript installation 
guide at http://mapserver.org/installation/php.html I see mod_php is 
still considered unsafe.


Jan


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


Re: [mapserver-users] FastCGI, MapServer and Apache on Linux

2010-09-01 Thread Jan Hartmann



On 09/01/10 16:46, Smith, Michael ERDC-CRREL-NH wrote:

Nic,

In the 2010 benchmarking effort, we are using mod_fcgid with the 
latest Apache. Here are the fcgi parameters we have in our conf file



  FcgidInitialEnv LD_LIBRARY_PATH 
/usr/lib64:/usr/lib:/usr/local/lib:/opt/mapserverfull/lib:/oracle/instantclient_11_2:/opt/mapserver/lib

  FcgidMinProcessesPerClass 0
  FcgidIdleScanInterval 1
  FcgidProcessLifeTime 10
  FcgidIOTimeout 100
  FcgidMinProcessesPerClass 0



Mike


--
Michael Smith
US Army Corps of Engineers
Remote Sensing/GIS Center
Hanover, NH


Any comments on comparing mod_fastcgi and mod_fcgid? Speed, thread-safety?

Jan




On 9/1/10 10:43 AM, "Nicolas Chenier"  wrote:

Thank you Jeff!

So you mean to tell me that this old tutorial is still the
baseline for FastCGI w/ Mapserver and Apache? This was written a
while back, and seems to be specific to Apache 1.3... Does anyone
know of any modifications that need to be done for Apache httpd
2.2? Any other/new optimizations to the fastCGI settings?

Thanks,

Nic



On Wed, 2010-09-01 at 07:48 +0200, Jeff McKenna wrote:


On 10-08-31 9:44 PM, Nicolas Chenier wrote:
> Good day all,
>
> I am fairly new at this, and I am seeking help.
>
> We are currently using a MapServer setup with Apache on
Linux, supported
> by Tilecache.
>
> Due to the growing number of maps and tiles, we need to cut
back on
> caching as we are running out of disk space to store the
tilecache.
>
> We would like to use FastCGI to generate tiles on the fly with
> MapServer, Apache and our SDE db connection, all running on
Linux.
>
> I am looking for the optimal way to get this setup, using the
latest
> Mapserver release with Apache2.
>
> Is there an easy step-by-step guide on getting this setup? I
have been
> searching through the web, the mapserver wiki and mailing
list without luck.
>
> I am simply looking for the optimal FastCGI configuration
settings,
> along with deployment instructions from scratch... doesn't
have to be
> too detailed but just an outline of how we should proceed... Does
> anything need to be recompiled with FastCGI support, etc etc...
>
> I really appreciate the help.
>

Hello,

You will find instructions on this at:
http://www.mapserver.org/optimization/fastcgi.html

If, during your MapServer/FastCGI travels, you have additional
notes to
add to the documentation, it would be great if you could file
a ticket
on MapServer Trac and record your additional notes there
(http://trac.osgeo.org/mapserver/) - if you do not have a
login, create
one at: https://www.osgeo.org/cgi-bin/ldap_create_user.py

Happy travels.

-jeff





___
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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] FastCGI, MapServer and Apache on Linux

2010-09-01 Thread Jan Hartmann
 Yes, the differences are significant: FastCGI seems to give speed 
improvements from 20 to 100 %. I never guessed it would be that much: I 
thought the Operating System itself cached the MapServer CGI program 
between calls as part of its swapping policy, but FastCGI does this way 
better.


Jan

On 09/01/10 12:35, Jeff McKenna wrote:

On 10-09-01 12:23 PM, Jan Hartmann wrote:

  Are there any benchmarks for a comparison between MapServer CGI and
MapServer FastCGI?



Yes, see the graphs included in last year's FOSS4G WMS benchmarking 
exercise: 
http://www.slideshare.net/gatewaygeomatics.com/wms-performance-shootout


-jeff

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


Re: [mapserver-users] FastCGI, MapServer and Apache on Linux

2010-09-01 Thread Jan Hartmann
 Are there any benchmarks for a comparison between MapServer CGI and 
MapServer FastCGI?


Jan

On 09/01/10 07:48, Jeff McKenna wrote:

On 10-08-31 9:44 PM, Nicolas Chenier wrote:

Good day all,

I am fairly new at this, and I am seeking help.

We are currently using a MapServer setup with Apache on Linux, supported
by Tilecache.

Due to the growing number of maps and tiles, we need to cut back on
caching as we are running out of disk space to store the tilecache.

We would like to use FastCGI to generate tiles on the fly with
MapServer, Apache and our SDE db connection, all running on Linux.

I am looking for the optimal way to get this setup, using the latest
Mapserver release with Apache2.

Is there an easy step-by-step guide on getting this setup? I have been
searching through the web, the mapserver wiki and mailing list 
without luck.


I am simply looking for the optimal FastCGI configuration settings,
along with deployment instructions from scratch... doesn't have to be
too detailed but just an outline of how we should proceed... Does
anything need to be recompiled with FastCGI support, etc etc...

I really appreciate the help.



Hello,

You will find instructions on this at: 
http://www.mapserver.org/optimization/fastcgi.html


If, during your MapServer/FastCGI travels, you have additional notes 
to add to the documentation, it would be great if you could file a 
ticket on MapServer Trac and record your additional notes there 
(http://trac.osgeo.org/mapserver/) - if you do not have a login, 
create one at: https://www.osgeo.org/cgi-bin/ldap_create_user.py


Happy travels.

-jeff

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


Re: [mapserver-users] raster query strategy

2010-08-18 Thread Jan Hartmann



On 08/18/10 00:46, Richard Greenwood wrote:

On Tue, Aug 17, 2010 at 2:57 PM, Frank Warmerdam  wrote:

Jan Hartmann wrote:

  Is this a bug? Shouldn't MapServer use the gdaladdo overviews at the
appropriate scales?


Rich / Jan,

No, generally I treat raster query as an "exact" operation done
against the full resolution data.  The overviews are only used
to satisfy downsampled RasterIO requests such as drawing a reduced
resolution map.

I wouldn't classify it as a bug, but it is an interesting question.
Displaying a map at 1:1,000,000 the user clicks and gets 30,000 cells
from my 10m grid. Which one is right, or "exact"? Right now I'm
averaging them, which is pretty much what gdaladdo has already done.
If you click on a raster map and want to know the value of the area 
under that click, shouldn't that be the value of the pixel in the 
original resolution, just as Frank implemented it in GDAL? What you are 
doing now is essentially querying a square, with an area varying 
according to scale,  and there is no other way to do that than by 
generalizing. Nothing wrong with that, of course, but is that really 
what you intend? And if MapServer's query function forces you to use 
that option, isn't *that* a bug?


Jan

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


Re: [mapserver-users] raster query strategy

2010-08-17 Thread Jan Hartmann
 Is this a bug? Shouldn't MapServer use the gdaladdo overviews at the 
appropriate scales?


Jan

On 08/17/10 16:09, Richard Greenwood wrote:

I am working with a single band raster of 10mX10m cells. I have added
overlays with gdaladdo and it displays nicely.

When I query the layer I am using MODE=nquery, not MODE=query. The
reason that I am using nquery is unrelated to the raster layer, but
I'm pretty much restricted to using that mode. At large scales this
returns at least 2 cells, which I can average easily with JavaScript
in the browser. However at small scales I'm getting 10s of 1000s of
cells which are really slowing things down. It does not appear that
query or nquery mode is using the overlays. Anyone disagree with that
assumption?

So the only solution that I've come up with thus far is to resample
the raster to larger cell sizes and use the min/max scale denominator
to select a layer with cell size appropriate to the scale. Anybody
have other ideas?

Thanks,
Rich


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


Re: [mapserver-users] Raster Strategies Examples

2010-08-03 Thread Jan Hartmann



On 08/03/10 16:06, Daniel Morissette wrote:


Jan, Jeff,

If you have ideas of an easier mechanism to help determine scales that
you would like to see added in MapServer then please share them... I'd
be happy to help improve this.

As a rule of thumb, for raster maps  I compute the scale that displays 
one pixel from the raster file  as exactly one screen pixel.  The 
optimal Maxscale-Minscale breakpoints between two raster maps are 
generally exactly in the middle of those basic scales  (depends a bit on 
format and compression ratio). For vector maps I start with the scale 
needed to display
the whole map on a 1000*1000 screen (becoming the largest Minscale) and 
try to figure out efficient breakpoints for smaller scales by counting 
the number of elements in the files. Most of the time, my 
Maxscale/Minscale pairs for different layers are derived by 
multiplying/dividing by two, on the basis of those basic values.


Those are just rules of thumb of course. I'm not sure whether they could 
or should be generalized into MapServer directives.


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


Re: [mapserver-users] php_mapscript with apache-php-dso

2010-08-03 Thread Jan Hartmann

 Yes, that did it. Thanks Daniel

Jan

On 08/03/10 15:28, Daniel Morissette wrote:

We do this in FGS so that's definitely possible.

Try adding a "PassEnv LD_LIBRARY_PATH" after the SetEnv directive in
your httpd.conf. PassEnv is required for CGI's to receive the env vars,
and it seems that it is also required for DSO modules.

Daniel

Jan Hartmann wrote:

  Hi folks,

I have compiled php-mapscript to run under a Linux Apache server with
php installed as a dynamic module. My whole binary tree is under $HOME,
and programs find their libraries via the environment variable
LD_LIBRARY_PATH. Everything works beautiful with PHP installed as a CGI
binary, but when PHP is installed as a module, Apache complains at
startup that it cannot find the GDAL libraries. It *does* find the
PHP-MapScript module, but that module tries to load GDAL, and that
library isn't visible, although LD_LIBRARY_PATH is set in Apache's
configuration with the SetEnv directive. Other local libraries, like
PostgreSQL, are loaded without  any problem.

Things are fixed when I set the library environment in /etc/ld.so.conf
and run the ldconfig command, but that can only be done by root. I want
to create binary distributions that are completely on the user level,
not needing any root access at all. Does anyone have a solution for this?

Jan
___
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] Raster Strategies Examples

2010-08-03 Thread Jan Hartmann



On 08/03/10 14:12, Frank Warmerdam wrote:



I find the MapServer scale values very confusing myself.  If I want
to compute the scale for particular request (for instance to establish
breakpoints for MINSCALE/MAXSCALE), I do a request at the target 
resolution
with shp2img and debug output on and examine the debug output for the 
scale

reported.

Would it make sense to add this functionality to MapServer? Finding 
scale breakpoints is a hassle indeed!


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


[mapserver-users] php_mapscript with apache-php-dso

2010-08-03 Thread Jan Hartmann

 Hi folks,

I have compiled php-mapscript to run under a Linux Apache server with 
php installed as a dynamic module. My whole binary tree is under $HOME, 
and programs find their libraries via the environment variable 
LD_LIBRARY_PATH. Everything works beautiful with PHP installed as a CGI 
binary, but when PHP is installed as a module, Apache complains at 
startup that it cannot find the GDAL libraries. It *does* find the 
PHP-MapScript module, but that module tries to load GDAL, and that 
library isn't visible, although LD_LIBRARY_PATH is set in Apache's 
configuration with the SetEnv directive. Other local libraries, like 
PostgreSQL, are loaded without  any problem.


Things are fixed when I set the library environment in /etc/ld.so.conf 
and run the ldconfig command, but that can only be done by root. I want 
to create binary distributions that are completely on the user level, 
not needing any root access at all. Does anyone have a solution for this?


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


Re: [mapserver-users] Allowing users to draw polygons on MapServer maps

2010-07-08 Thread Jan Hartmann

There is GeoMajas, but I have never looked at it:

http://geomajas.org/

And there is the "Canvas" HTML element 
(http://en.wikipedia.org/wiki/Canvas_element), something I am definitely 
going to look into when I have time. See a few GIS-demos at


http://www.canvasdemos.com/type/applications/maps-applications/

and the GnuPlot library, implemented in Canvas:

http://skuld.bmsc.washington.edu/~merritt/gnuplot/canvas_demos/

Perhaps an idea for 3D-MapServer: 
http://www.canvasdemos.com/type/applications/3d-applications/

or from the 3D section of the GnuPlot library above.

Jan

On 07/08/10 04:53, Bob Basques wrote:

David,

You could go with something in GeoMoose as well.  There is a demo 
available that includes drawing tools, you would need to set up your 
backend storage though on your own, with your tool of choice, but 
these get you half way there.  You can see a couple of demo sites with 
drawing/edit tools already configured here:


http://geomoose.org/info/demo.html

Both of these demos are available as downloads as well.

bobb



On 7/7/2010 8:50 PM, David Jantzen wrote:
Thanks Steve, I'll check out those projects.  I just did a proof of 
concept using the approach you describe with OpenLayers and WKT.  
Very nifty stuff.  Any gotchas to that approach?


On Jul 7, 2010, at 6:34 PM, Lime, Steve D (DNR) wrote:

Take a look at FeatureServer (or perhaps the WFS-T support in 
GeoServer or Tiny WFS). Such tools would facilitate the writing of 
geometries
to a data store (e.g. PostGIS) that MapServer could read from. Of 
course you could write your own tool to do that. We've used rails 
and serialized

geometries to/from OpenLayers as WKT easy enough.

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] On Behalf Of David Jantzen 
[djant...@ql2.com]

Sent: Wednesday, July 07, 2010 6:13 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Allowing users to draw polygons on 
MapServer maps


Hmm, this looks close to what I want:

http://openlayers.org/dev/examples/draw-feature.html

Any idea how I would export the polygons to a shapefile/database? 
What about loading them from a previous session?


Thanks,
David

On Jul 7, 2010, at 2:50 PM, 
  wrote:



On Jul 7, 2010, at 5:19 PM, ext David Jantzen wrote:


Hi All,

I've never used MapServer before, so this is definitely a newbie 
question.  I've read a bunch of the documentation and FAQ, but I 
haven't yet found a clear answer to this question:


Can I use MapServer to host a map, on which my clients can draw 
polygons and export them as shapefiles or into a database?  If 
not, is there another (open source) product that can?


Seems like one of the scripting toolkits could do this, but not 
without significant custom front end work.
I think this is approximately accurate. Personally, I would 
probably use

GeoDjango/OpenLayers for this kind of task.

Regards,
--
Christopher Schmidt
Nokia


___
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 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] creating views/queries on the fly

2010-07-07 Thread Jan Hartmann



On 07/07/10 14:50, P Kishor wrote:


(Sidenote: the QGIS experience is frustrating. The program can do so
much, but it does so in its own idiosyncratic, sometimes, seemingly
half-baked way. Even registering on the darned forums was an
impossibility. Apparently, I couldn't answer the
thwart-against-the-bots question correctly, and I certainly couldn't
read the almost illegible captcha.)
   

I'm not that negative about QGis, it's quite good and stable as long as 
you keep within its limits. However, as soon as you try to do something 
special, its structure turns out to be so complex and inelastic that it 
gets really difficult to add real new functionality. I have the same 
impression of OpenLayers and PHP, all very much community directed 
projects, in which many people do very intelligent things, only the sum 
of all those intelligent things tends to get more inflexible with every 
addition. I always liked PostGIS, GDAL, and especially MapServer, for 
their almost limitless expandability from very simple initial concepts.


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


Re: [mapserver-users] creating views/queries on the fly

2010-07-07 Thread Jan Hartmann



On 07/06/10 16:27, P Kishor wrote:

Yes, my preference is PL/Perl, but I am not sure how that would help?
What are you suggesting? Are you saying that I created services out of
the queries I want, and then access those services from within QGIS,
MapServer?

My problem is that all the potential queries are dynamic, but,
thankfully they are predictable. In pseudo SQL there are

SELECT g.id, g.the_geom, a.attribute1 attrib
FROM g JOIN a ON g.id = a.id
WHERE a.id IN (
 SELECT g1.id FROM g g1 WHERE
)

There are two things are variable in the above query
- 'attrib' could be 'a.attribute1' or 'a.attribute2', and so on.
- The '' would change.

So, the user will be able say, "Give me a map of attribute  for
," and get a map back.

Oh, and one more thing.. 'a' table could also change (this part is
experimental -- more on it in a bit). It could be 'a1 a' or 'a2 a',
and so on (note, a1, a2 have not corresponding mapping with
attribute1, attribute2).

The reason the 'a' table would/could change is that I am experimenting
with table partitioning in Pg. I have a master table from which there
are many inherited tables. Ideally, Pg is supposed to take care of
funneling the query to the correct inherited table based on the CHECK
rules, but if I ascertain that querying the correct table directly
results in some speed gain, I might go that route.
   

In such a situation, I treat the SQL-query as a string in 
PHP/Perl/Python/PlPGsql and change it with the string operators of those 
languages. The problem is: how do you get that string into the 
PostGresql interpreter. With a PHP-based site, you could create some 
text fields, let the user type in the values of the tables and 
attributes, and combine them into a valid SQL-command that can be 
processed with PHP-functions like pg_query. The query returns a map and 
that map can then be displayed in the browser.


With QGis it's not that easy. AFAIK, you can only define *static* WMS or 
PostGIS layers. Additionally, a PostGIS layer has to be a predefined 
table or view, not a written-out Select-query. And PostGresql does not 
have parametrized views (yet), so you cannot change the parameters of a 
view during run time. I don't think you can do these flexible queries 
with regular QGis, but perhaps a Python front-end could be written.  
It's a matter of letting QGis send a string to the Web-Server. After 
that it's easy.


Are you really dependent on QGIS? Else you could use a browser based 
mapping solution (OpenLayers?) with some text fields to type your query 
parameters in. The server could send back the results in WMS or even WFS 
format and the browser would display those.


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


Re: [mapserver-users] creating views/queries on the fly

2010-07-06 Thread Jan Hartmann

Hi Puneet,

Would a scripting language, like Pl/Pgsql, be something to tackle your 
problem? It lets you build dynamic commands: 
http://www.postgresql.org/docs/8.4/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN. 



I have also used PHP to build dynamic SQL queries, but I don't know if 
you can use that in your environment. I access those PHP-scripts in QGis 
by writing out the mapping results as WMS services 
(http://mapserver.org/ogc/mapscript.html).


You could also try Pl/Python from  within Postgresql 
(http://www.postgresql.org/docs/8.4/interactive/plpython.html)l. I've 
never used it, but it's syntactically certainly more flexible than 
Pl/Pgsql. Or even Pl/Perl, if your inclinations lie in that direction :-)


Jan

On 07/06/10 06:39, P Kishor wrote:

This started of as a QGIS question, but I am finding it impossible to
register for the QGIS forums, so I am asking on the MapServer list, as
this is going to evolve into a MapServer question as well.

I want to query a PostGIS db with arbitrary queries -- views that join
spatial and non-spatial tables. However, the permutations of these
queries are too many to predefine them as views. As far as I can tell,
QGIS does not allow me to create views/queries on the fly. It can only
connect to an already defined view, which I can then further filter,
but it can't actually let me create a view.

So, what is the best way to go about doing this with MapServer? Oh,
and if someone could kindly shed light on QGIS's capabilities in this
regard, well, that would be gravy.

Many thanks,

   

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


Re: [mapserver-users] Custom Projections with WMS Server

2010-05-04 Thread Jan Hartmann
I tried this with QGIS, and it didn't work. AFAICS QGIS only accepts 
well know EPSG numbers.


Jan

On 05/04/10 15:15, Travis Kirstine wrote:

Is it possible to configure a wms server with custom projections (add
a entry in the epsg file and mapfile) and have is available to client
applications (ArcGIS, GeoMedia, QGIS, etc...)?

Regards
___
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] Can map server do this?

2010-04-26 Thread Jan Hartmann
Looks a bit like Sketchup. How about a driver for Sketchup 3D? It has 
already input- en output facilities for DXF and DEM


Jan

On 04/26/10 16:51, Lime, Steve D (DNR) wrote:

I can't tell from the example but it doesn't look like the map itself is 
oblique rather that the buildings are drawn in 2.5D.

If so, this probably can be reduced to a data pre-processing exercise. I 
created a small test case (see attached) where a the pieces of a cube are
drawn by MapServer. It was quick and dirty but it shows MapServer can possibly 
render like the example you referenced. Key is producing the
cube (sides, top, and bottom) data. I would expect that could be done ahead of 
time via a script where you offset the footprint in the y direction
by a height value and then compute the sides- each as a separate shape. I 
suppose it would be possible to create a plugin layer for this type of
data (footprint + height) but easiest route is probably data pre-processing

Something to try anyway.

Steve
___
From: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jackey Cheung 
[cheung.jac...@gmail.com]
Sent: Monday, April 26, 2010 2:53 AM
To: Lars Lingner
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Can map server do this?

Your effect is shadow like effects, not the "cube" like effect.

On Mon, Apr 26, 2010 at 3:38 PM, Lars 
Lingnermailto:m...@lingner.eu>>  wrote:
Jackey Cheung schrieb:
   

Just found a web site today. The map looks pretty like Google map, except
that it's not on Google. Can map server do this? Or anyone has any idea
which application can render this kind of image?

 

I got a similar result using opacity and offset with MapServer. See
  image http://www.lingner.eu/mydownloads/pics/icc_building.png

Lars

___
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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] mapserver.org down?

2010-04-26 Thread Jan Hartmann

Hi all,

Am I the only one that doesn't get through to mapserver.org? Pages take 
ages to load and then break off with a timeout.


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


[mapserver-users] mapserver.org down?

2010-04-26 Thread Jan Hartmann

Hi all,

Am I the only one that doesn't get through to mapserver.org? Pages take 
ages to load and then break off with a timeout.


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


  1   2   >