Re: [MapServer-users] Missing blank in SQL

2024-06-26 Thread Sven Schroeter via MapServer-users

Hi,

 "USING SRID...", try this:

DATA "GEOM FROM TEST_TABLE USING UNIQUE objid_parent USING SRID=25832"


Greetings Sven


Am 26.06.2024 um 12:16 schrieb G. Völkl via MapServer-users:

Hello


In the map file is this statement

DATA "GEOM FROM TEST_TABLE using unique objid_parent SRID 25832"

I get this message from mapserver in log file

Error: ORA-00907: missing right parentesis

. Query statement: SELECT SDO_AGGR_MBR(GEOM) AS GEOM from (SELECTGEOM 
FROM test_table)


This have to be changed SELECTGEOM to select geom

Can I do something in the map file or is it a bug?



Best regards Gerhard




Von meinem iPhone gesendet

___
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] I want to change Map

2023-11-28 Thread Sven Schroeter via MapServer-users

Hi,

Tile-based maps are provided in a predefined tileset. In the case of 
Google or OSM, for example, this is usually in EPSG 3857 and is defined 
in a grid with corresponding resolutions for the different zoom levels 
(always based on an extent): 
https://mapserver.org/mapcache/config.html#preconfigured-grids

A WMS is usually used as the data source.
Of course, you can also do this for self-defined tilesets with other 
resolutions and extents, as in the case of the Korean institute.
With MS4W and the Mapcache software it contains, you can define and 
create such a tileset yourself.


Greetings from Germany
Sven



Am 28.11.2023 um 02:00 schrieb 최종호 via MapServer-users:

Hello everyone.!
Good morning.

I'm Choi and I'm Korean.
I'm trying to load and manage a map.

1. I found mapwingis for C#

2. I found video for sample
https://www.youtube.com/watch?v=mBu9XgrfZfM
    In this video, he gets map images with SAS.planet program and 
supplies maps with ms4w.

    After, he loaded the maps in C# project with axmap.

3. I did the sample and it works well.

4. It will take about 200 days to get 20 level's maps with SAS.planet 
program for some area)


5. So, I got new maps about 4TB from https://www.ngii.go.kr/ is 
Korea's National Geographic Information Institute


6. But, I failed to load the new map in sample c# project
    // Source code used in video C# project
    providers.Add(providerid, "map", "http://127.0.0.1/map/z{zoom}/ 
*{y}/{x}*.png", 
tkTileProjection.SphericalMercator, 0, 13);


    // Modified Source code
    providers.Add(providerid, "map", "http://127.0.0.1/map1/z{zoom}/ 
*{x}/{y}*.png", 
tkTileProjection.SphericalMercator, 0, 13);



7. After I found some differences.

    - Sample's map is Google map based EPSG:4326 and file's array is 
{zoom}{y}{x} and image's size 256*256 pixels


    - But my new maps are based EPSG:5179 and files array is 
{zoom}[x]{y} and image's size

512*512 pixels

If someone knows the way to load my new maps with ms4w
Please, let me know.

Thank you!

Best regards
Choi.




___
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 Sven Schroeter via MapServer-users
msIO_getStdoutBufferBytes is the mapscript function and fetch the 
current stdout buffer contents as a binary buffer:

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

I think its the same?


Sven



Am 13.11.2023 um 15:45 schrieb Jan Hartmann:
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


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

2023-11-13 Thread Sven Schroeter via MapServer-users

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


Re: [MapServer-users] mapserver 5 installation

2023-06-19 Thread Sven Schroeter

Hi Valeri,
I have created a document for the installation under the IIS, where the 
map server runs cleanly via the FastCGI module.
In addition, the map server is not addressed as mapserv.exe, but as an 
alias, e.g. mapserv.fcgi, which some firewalls will thank you for.

My doku is in german, which is hopefully no obstacle;-)
https://netgis.de/download/Mapserver_IIS.pdf

Greetings Sven



Am 19.06.2023 um 15:51 schrieb Liandres, Valeri:


Hello We are trying to install mapserver 5.0.beta2 on Windows-IIS. 
Although we diligently completed all installation points, it remains 
impossible to find mapserv.exe's own configuration file.It gives the 
impression of FastSGI not working properly.


Can anyone help us?

Valeri


___
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] Is there a way to make OPACITY depends of SCALE?

2023-03-30 Thread Sven Schroeter

Hi,

I think that would only be possible with several layers  in a GROUP at 
the moment...


Greetings Sven


Am 30.03.2023 um 11:53 schrieb Carlos Neves (LREC):


Hi List,

Is there a way to change OPACITY by scale? The goal is to show 
Orthophotomaps under risk areas.


LAYER # Rock Fall Risk Model
    NAME "rockfall"
    COMPOSITE
    OPACITY 50
    END
    DATA "geotiffs/risk_m.tiff" # GeoTiff RockFall Risk File
    STATUS   default
    TYPE RASTER

    METADATA
   "wms_title" "rockfall"
    END
    TEMPLATE "rockfall_query.html" # Rockfall Query file
    CLASS
    NAME "RockFall Risk"
    EXPRESSION ([pixel] > 0 )
    #MAXSCALEDENOM 1
    #MINSCALEDENOM 2000
    STYLE
    DATARANGE 1 3
            COLORRANGE 255 255 0 255 0 0
    END #STYLE
    END #Class


END # Rock Fall layer ends here 



risk map example:

Best Regards,

Carlos


___
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] Tutorials for creating time dimension images and good web frontends for dynamically changing map projects?

2022-10-14 Thread Sven Schroeter

here are some quick ideas which tools could be interesting in this context:

If you want to start with python (or php) then I would think about using 
mapserver based on mapscript.

https://mapserver.org/mapscript/index.html
You can use ogr2ogr to easily create shapefiles.
For meteorological analysis the time parameter for WMS services is useful.
For leaflet there is a plugin: 
https://github.com/socib/Leaflet.TimeDimension


Happy mapserving
Sven

Am 14.10.2022 um 08:39 schrieb Stefan Gofferje:

Good morning all!

After the relative ease of my first mapserver project, I'm now 
motivated and keen on getting another project running.


Since about a year (plus minnus), I'm every day checking for Sentinel 
I and II data covering the area where I live. If there is anything, I 
download the data and run some scripts which do automatic processing 
and generating of composites, like SAR VV/VH or NDVI, NDCI, etc.

The ready images are then posted to a Telegram channel.

At the moment, there's still a number of manual steps (search data, 
decide what to download, trigger download, trigger processing and 
trigger Telegram push) and the existing scripts are Bash scripts 
calling GDAL tools.


My first step now is to learn Python and move everything from Bash to 
Python and automate it, ideally so far that the whole process can run 
in a Docker container as a cron job.


Then I was thinking, instead of pushing images to Telegram, I could 
use mapserver to serve the images to some web frontend. The map files 
are very easily created programmatically, so that should be easy. I'm 
missing a few things for that, though:
While going through mapserver's docs, I noticed that it can handle 
time dimensions for imagery. That sounds like something worth 
exploring. The docs describe the use of a shape file but 
unfortunately, I have no clue how to to *create* that programmatically.


Regarding the frontend, I could just put up a single page leaflet app. 
That would be easy enough. But I'm wondering if there's already some 
cool solutions out there.


So, If anybody has a link or pointer for me on the programmatic 
creation of shape files for time-indexed imagery and/or interesting 
web frontend projects, I would be very grateful!


-Stefan




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


Re: [MapServer-users] "Emergency" map server on Raspberry Pi - raster/PNG source in folder structure

2022-10-12 Thread Sven Schroeter

that's exactly what I thought;-)
You can also do this with QGIS


Am 12.10.2022 um 16:57 schrieb Stefan Gofferje:

Hi,


On 10/12/22 16:37, Sven Schroeter wrote:
I don't know if I understood you correctly, but I think the solution 
for you would be an image catalog, right?

Then you would have only one layer for the UTM maps.
In the mapfile it would look like this, in the .dbf in the column 
"location" would be the paths to the png data.


LAYER
 NAME "utm_data"
 STATUS ON
     MAXSCALE 8000
 TILEINDEX "filesindex_png.shp"
 TILEITEM "location"
 TYPE RASTER
 PROCESSING "Resample=average"
     CLASS
     name "utm_data"
     END
END
Like here: 
https://mapserver.org/input/raster.html#rasters-and-tile-indexing ?
I'm still a total newbie to mapserver and haven't had much time to 
tinker with it yet, unfortunately. But that looks easy enough.
So, basically, I 'find' all pngs/pgws, move them from the subfolders 
into one folder and run gdaltindex over the folder. And that creates a 
shapefile which I use as data source? Let's try that.


-S




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


Re: [MapServer-users] "Emergency" map server on Raspberry Pi - raster/PNG source in folder structure

2022-10-12 Thread Sven Schroeter

Hi Stefan,

I don't know if I understood you correctly, but I think the solution for 
you would be an image catalog, right?

Then you would have only one layer for the UTM maps.
In the mapfile it would look like this, in the .dbf in the column 
"location" would be the paths to the png data.


LAYER
    NAME "utm_data"
    STATUS ON
    MAXSCALE 8000
    TILEINDEX "filesindex_png.shp"
    TILEITEM "location"
    TYPE RASTER
    PROCESSING "Resample=average"
    CLASS
    name "utm_data"
    END
END


Greetings Sven



Am 12.10.2022 um 12:55 schrieb Stefan Gofferje:

Hi all,

Life (and COVID) hit, so I never got anywhere with updating my weather 
website and taking mapserver into use there.


Currently I have another project - due to the geopolitical situation:
I'm working on a mobile system to provide emergency/off-grid 
"tactical" communication and data. It's centered on a Raspberry Pi and 
includes things like Meshtastic and others. One of the things I would 
like to add is a WMS/WFS server to provide map data via local Wifi AP 
to connected devices.


Topographical (and other) maps of whole Finland are available under 
CC4 from the Finnish Land Survey through the KAPSI non-profit. The 
maps are in 12kx12k PNGs in a folder structure by UTM grid. See here: 
http://kartat.kapsi.fi/files/peruskarttarasteri_jhs180/taustavari_korkeuskayrilla/1m/etrs89/png/ 


The data can by rsync'd down.
I'm not clear how I would configure mapserver for that. Do I have to 
create one map with extent and such for each PNG tile or can I point 
mapserver to the root directory  of the data and tell it to go through 
it recursively and get the data from the PGW sidecar files?


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


Re: [mapserver-users] Mapserver 8, PHP 8 and Mapscript

2022-07-22 Thread Sven Schroeter

Hi Jeff,

thanks, I have a problem when using -DWITH_PHPNG=ON \

Is that SWIG still expects PHP 7 and therefore errors occur during make

[ 99%] Swig compile ../mapscript.i for php7

[ 99%] Built target php_mapscriptng_swig_compilation

Scanning dependencies of target php_mapscriptng

[ 99%] Building C object 
mapscript/phpng/CMakeFiles/php_mapscriptng.dir/CMakeFiles/php_mapscriptng.dir/mapscriptPHP7_wrap.c.o


/root/mapserver-8.0.0-beta1/build/mapscript/phpng/CMakeFiles/php_mapscriptng.dir/mapscriptPHP7_wrap.c:755:3: 
error: #error These bindings need PHP7 - to generate PHP5 bindings use: 
SWIG < 4.0.0 and swig -php5


755 | # error These bindings need PHP7 - to generate PHP5 bindings use: 
SWIG < 4.0.0 and swig -php5


...

any idea?


thanks

Sven





Am 21.07.2022 um 15:12 schrieb Jeff McKenna:
I should also add here, as you mention PHP 8: I did much effort 
recently to upgrade the continuous build systems (TravisCI, GitHub 
action) so that various PHP versions are now tested for PHPNG 
MapScript, including PHP 8.1.x, and re-enabled PHPUnit tests that test 
each MapScript object, every time a pull request or commit is made to 
the project repository. (you can find those tests inside 
/msautotest/php/ and follow the README there)


More tests are warmly welcomed of course! :)

Thanks,

-jeff



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


[mapserver-users] Mapserver 8, PHP 8 and Mapscript

2022-07-21 Thread Sven Schroeter

Hi,

I have a Problem compiling with Mapserver 8, PHP 8 and Mapscript on 
Debian 11 Bullseye


I have downloaded Mapserver 8.0 beta and configured it as follows:

|cmake-DCMAKE_INSTALL_PREFIX=/opt \|

|-DCMAKE_PREFIX_PATH=/usr/local:/opt \|

|-DWITH_CLIENT_WFS=ON \|

|-DWITH_CLIENT_WMS=ON \|

|-DWITH_WCS=ON \|

|-DWITH_THREAD_SAFETY=ON \|

|-DWITH_PHP=ON \|

|-DWITH_KML=ON \|

|-DWITH_GEOS=ON \|

|-DWITH_GDAL=ON \|

|-DWITH_OGR=ON \|

|-DWITH_PROJ=ON \|

|-DWITH_CAIRO=ON \|

|-DWITH_POSTGIS=ON \|

|-DWITH_CURL=ON \|

|-DWITH_SOS=ON \|

|-DWITH_XMLMAPFILE=0 \|

|-DWITH_FCGI=ON \|

|-DWITH_LIBXML2=ON \|

|-DWITH_GIF=ON \|

|-DWITH_FRIBIDI=0 \|

|-DWITH_HARFBUZZ=0 \|

|-DWITH_PROTOBUFC=0 \|

|-DWITH_PYTHON=OFF \|

|-DWITH_SVGCAIRO=OFF \|

|..|

 When I use Mapserver 7.6.4 in the same setup, the following lines appear:

-- /usr/include/php/20200930/main

-- Found PHP-Version 8.0.21 (using /usr/bin/php-config)

In Mapserver 8 these are missing and accordingly the output in 
mapscripts is:


--* Mapscripts

--* Python: disabled

--* PHPNG: disabled

That means PHP is not activated. In comparison the output with Mapserver 
7.6.4:


--* Mapscripts

--* Python: disabled

--* PHP: ENABLED

--* PHPNG: disabled

It is the same server with the same installation components. 
Accordingly, in a make and make under Version 8 install PHP Mapscript is 
not installed.


php - v generates the following

Unable to load dynamic library 'php_mapscript.so' (tried: 
/usr/lib/php/20200930/php_mapscript.so 
(/usr/lib/php/20200930/php_mapscript.so: cannot open shared object file: 
No such file or directory), /usr/lib/php/20200930/php_mapscript.so.so 
(/usr/lib/php/20200930/php_mapscript.so.so: cannot open shared object 
file: No such file or directory)) in Unknown on line 0


Note: PHP is installed with FPM module (php8.0-fpm) and instead of 
mpm_prefork mpm_event is used.



Any idea?

Thanks Sven


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


Re: [mapserver-users] Announcing MS4W 5.0-beta1

2021-12-15 Thread Sven Schroeter

Hi Jeff,

thank you for this beta version!
I got ms4w installed without any problems.
When I start the examples it comes to an error message regarding proj, 
even if I copied the proj from the folder C:\ms4w\share\proj to the 
C:\ms4w, or have I misunderstood something?
If I put in the local.map CONFIG "PROJ_LIB" "C:/proj/nad/" everything 
works fine.
Another question about php Mapcript: Now do not have to include 
mapscript.php for the swig variant?


best regards from Germany
Sven


Am 11.12.2021 um 15:47 schrieb Jeff McKenna:

Hello MapServer community!

I'm thrilled to announce that MS4W 5.0 has arrived for Windows users, 
with its first beta.  Get it at: 
https://ms4w.com/release/experimental/ms4w_5.0.0_beta1.zip


A ton of effort has been happening for months, almost a year, for this 
release (there have been 13+ alpha builds already).  The plan is to 
release the final MS4W 5.0 in January, along with the MapServer 8.0 
release then; but this first public beta allows power users and admins 
to begin adapting their environments.


As always feedback is encouraged through the MS4W issue tracker: 
https://ms4w.com/trac


A temporary link to the new documentation is: 
https://ms4w.com/README_INSTALL_MS4W_5.html (but please always use the 
local README in your download).


Here are some of the highlights:

- PHP 8.1 MapScript (very fast wow!)
- Python 3.10.1 MapScript (added quickmap.py and other test files, 
similar to the usual PHP files)
- ms4w.conf & other security requirements (see 
https://ms4w.com/README_INSTALL_MS4W_5.html#securing-your-ms4w-installation 
)


Your test workflow might be:

- open command prompt
- cd ms4w
- setenv.bat
# download PROJ grids locally
- proj-install-grids.bat (install grid files into 
/ms4w/share/proj/grids/  see 
https://ms4w.com/README_INSTALL_MS4W_5.html#proj-networking )

# test PHP MapScript (PHP 8.1 is very fast wow!)
- php -dextension=C:/ms4w/Apache/php/ext/php_mapscript.dll -r "echo 
msGetVersion();"

# test Python MapScript (actually Python 3.10.1)
- python -c "import mapscript; print (mapscript.msGetVersion())"

Here are some of the specific changes:

 - upgraded MapServer and MapScript (PHP, Python, CSharp, 
Java) to today's 8.0.0-dev

 - rebuilt MapServer plugins (Oracle, Microsoft SQL Server)
 - removed unnecessary folder /ms4w/apps/phpmapscriptng-swig
 - updated /htdocs/quickmap.php
 - added new required ms4w.conf file into /ms4w root and
   set MAPSERVER_CONFIG_FILE location in Apache httpd.conf and
   /ms4w/setenv.bat
 - set default MS_MAP_BAD_PATTERN in Apache's httpd.conf
   to prevent directory traversing (trac ticket 333)
 - added new utility 'map2img' that replaces the old 'shp2img',
   as of MapServer 8.0 (trac ticket 358)
 - upgraded Apache HTTP Server to 2.4.51 (security release)
 - upgraded PHP to 8.1.0 security release (trac ticket 304)
   with Visual Studio 2019 compiler(trac ticket 339)
 - upgraded GDAL to 3.4.0 (including CSharp/Java/Python 
bindings, ECW/Oracle plugins)

   with Visual Studio 2019 compiler (trac ticket 211)
 - upgraded MapCache to 1.11dev (git-master-2021-10-23)
 - added PostgreSQL as a dimension backend for MapCache with
   Visual Studio 2019 compiler
 - include latest mapcache.xml.sample
 - upgraded libjpeg-turbo support to 2.1.1 with Visual Studio 
2019 compiler

   (trac ticket 328)
 - rebuilt zlib support with Visual Studio 2019 compiler
 - rebuilt libPNG support with Visual Studio 2019 compiler
 - added Esri LERC compression plugin for GeoTIFF (trac ticket 
330)

 - upgraded Zstandard compression support (for TIFF) to 1.5.0
   with Visual Studio 2019 compiler (trac ticket 313)
 - upgraded libTIFF support to 4.3.0 with Visual Studio 2019 
compiler

   (trac ticket 327)
 - upgraded SQLite support to 3.36.0 with Visual Studio 2019 
compiler

   (trac ticket 329)
 - upgraded OpenSSL to 1.1.1l HIGH level security release with 
Visual

   Studio 2019 compiler(trac ticket 310)
 - upgraded cURL support to 7.80.0 with Visual Studio 2019 
compiler

   (trac ticket 308)
 - upgraded PROJ support to 8.2.0 with Visual Studio 2019 
compiler

   (trac ticket 198)
 - added proj-install-grids.bat to optionally download all PROJ
   grids into /ms4w/share/proj/grids/
 - add PROJ environment variables for handling grids (trac 
ticket 198)
 - upgraded GeoTIFF support to 1.7.0 with Visual Studio 2019 
compiler

   (trac ticket 212)
 - rebuilt ECW (3.3 SDK) plugin with Visual Studio 2019 compiler
 - upgraded Expat support to 2.4.1 with Visual Studio 2019 
compiler

   (trac ticket 319)
 - rebuilt Xerces support with Visual Studio 2019 compiler
 - rebuilt Szip support with

Re: [mapserver-users] INSPIRE WMS - INSPIRE

2021-09-16 Thread Sven Schroeter

Hi Marga,

maybe this is helpful:
https://mapserver.org/ogc/inspire.html

Greetings Sven



Am 16.09.2021 um 10:08 schrieb CALETRIO ARCOS, MARGARITA:


Hi, I am trying to get a validated INSPIRE View Map Service. I haven’t 
found a complete information about how to write the .map to obtain the 
correct capabilities xml to be validated with INSPIRE VALIDATOR 
besides, I don’t have experience using mapserver. I hope you can help 
me, thanks.


1: where and how it’s defined in mapserver the namespaces that appear 
in the getcapabilities xml. I think it’s not defined iat the .map.


How can I change the namespaces that appear in the capabilities xml?

2: Please, can someone send me a mapserver file .map and its 
getcapabilities xml associated according with INSPIRE to understand 
how to conform the desired getcapabilities xml?


Thank you.

Regards Marga


___
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 on Debian 10

2021-06-14 Thread Sven Schroeter via mapserver-users

Hi,

I am trying to get PHP Mapscript to run stably on a Debian 10 machine.
The installation actually worked fine and everything is running, only 
there is an error after each automatic nightly restart of the Apache 
server.
After that PHP continues to run, but the Mapscript module does not work 
anymore.


This is the error message from Apache after the restart at night:

[Mon Jun 14 00:00:04.851967 2021] [mpm_prefork:notice] [pid 24101] 
AH00171: Graceful restart requested, doing restart
[Mon Jun 14 00:00:05.847274 2021] [mpm_prefork:notice] [pid 24101] 
AH00163: Apache/2.4.38 (Debian) configured -- resuming normal operations
[Mon Jun 14 00:00:05.847340 2021] [core:notice] [pid 24101] AH00094: 
Command line: '/usr/sbin/apache2'
[Mon Jun 14 00:00:06.934284 2021] [core:notice] [pid 24101] AH00052: 
child pid 29129 exit signal Segmentation fault (11)


If I restart Apache manually after that everything runs normal again.


I did the following installation of Mapscript and Mapserver:

1. Installation Apache Postgres GDAL:
apt-get -y install apache2 libapache2-mod-php postgresql-11-postgis-2.5 
gdal-bin

postgresql-11-ogr-fdw && apt-get clean

2. PHP components:
apt-get -y install php-pgsql php-gd php-curl php-mbstring php-sqlite3 
php-zip phpsqlite3 php-bcmath php-xml && apt-get clean

a2enmod cgi && systemctl restart apache2

3. Mapserver 7.6x with PHP Mapscript - own compilation with cmake:

sudo apt-get install libfreetype6-dev php-dev libproj-dev libfribidi-dev
libharfbuzz-dev libcairo-dev libgdal-dev libgpg-error-dev 
libcurl4-openssl-dev

libfcgi-dev

wget http://download.osgeo.org/mapserver/mapserver-7.6.3.tar.gz && /
tar xvf mapserver-7.6.3.tar.gz && /
cd mapserver-7.6.3/
sudo apt-get install cmake
mkdir build
cd build

cmake -DCMAKE_INSTALL_PREFIX=/opt \
-DCMAKE_PREFIX_PATH=/usr/local:/opt \
-DWITH_CLIENT_WFS=ON \
-DWITH_CLIENT_WMS=ON \
-DWITH_WCS=ON \
-DWITH_THREAD_SAFETY=ON \
-DWITH_PHP=ON \
-DWITH_KML=ON \
-DWITH_GEOS=ON \
-DWITH_GDAL=ON \
-DWITH_OGR=ON \
-DWITH_PROJ=ON \
-DWITH_CAIRO=ON \
-DWITH_POSTGIS=ON \
-DWITH_CURL=ON \
-DWITH_SOS=ON \
-DWITH_XMLMAPFILE=0 \
-DWITH_FCGI=ON \
-DWITH_LIBXML2=ON \
-DWITH_GIF=ON \
-DWITH_FRIBIDI=0 \
-DWITH_HARFBUZZ=0 \
-DWITH_PROTOBUFC=0 \
-DWITH_PYTHON=OFF \
-DWITH_SVGCAIRO=OFF \
..
make
sudo make install
echo extension=php_mapscript.so>/etc/php/7.3/mods-available/mapscript.ini

phpenmod mapscript
service apache2 restart

after these installation steps I have a perfectly running PHP version 
7.3.27-1~deb10u1 with Mapscript (MapServer version 7.6.3) but as said 
the Mapscript module error after every nightly restart of Apache.

If I restart Apache manually after that everything runs normal again.
I am now quite at a loss...

Thanks for any advice, unfortunately I am not a Debian (Linux) expert.

Sven




After this



Greetings Sven


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


Re: [mapserver-users] HTML Legends with MapServer

2020-05-07 Thread Sven Schroeter
the templates are usually not very complex, but rather long due to the 
large number of layers, here is a shortened example:

https://mapcache.de/ex/legend_template.html
Sven


Am 07.05.2020 um 16:30 schrieb Steve Lime:

Query templates already support the concept of includes:

  [include src="some other template"]

so I wonder if it might be possible to extend that functionality to 
HTML legend processing. Do you have a particularly complex example you 
could share with me?


--Steve

On Thu, May 7, 2020 at 4:42 AM Sven Schroeter <mailto:schroe...@netgis.de>> wrote:


Hi all,

i have been using html legend templates for the mapserver for a very
long time.
With many layers such a template can become very long and confusing.
Is there a possibility to split such a template into several files
and
e.g. include certain areas like in the mapfile?
Maybe I could solve this with PHP Mapscript?  Up to now I have been
using processLegendTemplate to output the HTML code.

Thanks
Sven



___
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] HTML Legends with MapServer

2020-05-07 Thread Sven Schroeter

Hi all,

i have been using html legend templates for the mapserver for a very 
long time.

With many layers such a template can become very long and confusing.
Is there a possibility to split such a template into several files and 
e.g. include certain areas like in the mapfile?
Maybe I could solve this with PHP Mapscript?  Up to now I have been 
using processLegendTemplate to output the HTML code.


Thanks
Sven



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

Re: [mapserver-users] Problem with UNION layer and labelling

2019-10-20 Thread Sven Schroeter


Hi Oliver,
this is a complex SQL statement and I would always store such things in 
a view on the database. Then you can visually check if all data comes as 
it should.
Otherwise it could be due to the encoding of the data records, I 
sometimes had problems with it in the past.
By the way, you can just ask Armin Retterath in your house, he will find 
every error ;-)

Greetings also to Armin
Sven

**
NETGIS GbR
Benediktinerstr. 32a
54292 Trier
Tel.: 0651-1704731
Fax: 0651-1704733
schroe...@netgis.de
www.netgis.de


Am 18.10.2019 um 13:56 schrieb Oliver Schmidt:

Hi list,

I tried with MapServer 7.0.4 and 7.4.2 to get labels on an UNION layer. The 
labels are OK when I loaded the source layer itself into QGIS, but the UNION 
layer returns an empty picture (using LABELITEM) or the name of the label field 
including the brackets is placed instead of the data (using TEXT inside LABEL).
Furthermore, the variable settings for ANGLE, FONT, SIZE and POSITION don't 
seem to be handled correctly in the UNION layer. The font size and the position 
aren't identical to the source layer. Layers with polygons and no labels are 
drawn correctly!

Does anyone got an idea what is going wrong here? One example with just one 
layer:


 LAYER NAME "Beschriftung Flurstuecke"
 CONNECTIONTYPE UNION
 CONNECTION "bfn"
 TYPE POINT
 STATUS ON
 STYLEITEM "AUTO"
 EXTENT 25 542 50 5648000
 MAXSCALEDENOM 25000
 METADATA
 wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:3034 
EPSG:3857"
 wms_layer_group "/Flurstueck"
 wms_title "Beschriftung Flurstuecke"
 END
 CLASS END
 PROJECTION "init=epsg:25832" END
 END

.

 LAYER NAME "bfn" # Flurstücke / Nummern / Beschriftungen
 CONNECTION "dbname='db' host=host port=5432 user='user'"
 CONNECTIONTYPE POSTGIS
 DATA "geom FROM (SELECT ogc_fid,gml_id,text,f.umn AS color_umn,lower(art) 
|| coalesce('-'||effekt,'') ||CASE WHEN stil='Kursiv' THEN '-italic' WHEN stil='Fett' THEN 
'-bold' WHEN stil='Fett, Kursiv' THEN '-bold-italic' ELSE '' END || CASE WHEN 
coalesce(fontsperrung,0)=0 THEN '' ELSE '-'||(fontsperrung/0.25)::int END AS 
font_umn,0.25/0.0254*skalierung*grad_pt AS size_umn,CASE 
coalesce(l.vertikaleausrichtung,s.vertikaleausrichtung)  WHEN 'oben' THEN 'L' WHEN 'Basis' THEN 
'U' ELSE 'C' END || CASE coalesce(l.horizontaleausrichtung,s.horizontaleausrichtung) WHEN 
'linksbündig' THEN 'L' WHEN 'rechtsbündig' THEN 'R' ELSE 'C' END AS 
position_umn,drehwinkel_grad,point AS geom FROM po_labels l JOIN alkis_schriften s ON 
s.signaturnummer=l.signaturnummer AND s.katalog=1 JOIN alkis_farben f ON s.farbe=f.id WHERE 
thema='Flurstücke' AND modell && ARRAY['DLKM','DKKM1000']::varchar[] AND (layer IN 
('ax_flurstueck_nummer','ax_flurstueck_zuordnung','ax_flurstueck_zuordnung_pfeil')) AND point IS 
NOT NULL) AS foo USING UNIQUE ogc_fid USING SRID=25832"
 EXTENT 25 542 50 5648000
 #   LABELITEM "text"
 MAXSCALEDENOM 5000
 METADATA
 wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:3034 
EPSG:3857"
 #   wms_layer_group "/Flurstücke/Nummern"
 wms_layer_group "/Flurstücke"
 #   wms_title "Beschriftungen (Punkte)"
 wms_title "Beschriftungen (Flurstücke)"
 #   wms_enable_request "* !GetCapabilities"
 END
 PROCESSING "CLOSE_CONNECTION=DEFER"
 PROJECTION "init=epsg:25832" END
 SIZEUNITS INCHES
 STATUS ON
 SYMBOLSCALEDENOM 1000
 TYPE POINT
 UNITS METERS
 CLASS
 LABEL
 ANGLE [drehwinkel_grad]
 ANTIALIAS TRUE
 FONT [font_umn]
 SIZE [size_umn]
 BUFFER 2
 COLOR [color_umn]
 FORCE TRUE
 OUTLINECOLOR 255 255 255
 OUTLINEWIDTH 2
 POSITION [position_umn]
 PRIORITY 10
 TYPE TRUETYPE
 TEXT '[text]'
 END
 END
 END


--
Dipl.-Geogr. Oliver Schmidt


LANDESAMT FÜR VERMESSUNG UND GEOBASISINFORMATION RHEINLAND-PFALZ


Von-Kuhl-Straße 49
56070 Koblenz
Telefon 0261 492-346
Telefax 0261 492-492
oliver.schm...@vermkv.rlp.de
www.lvermgeo.rlp.de
__

Re: [mapserver-users] Download Windows binaries of MapServer

2019-09-27 Thread Sven Schroeter

Hello,
I don't think the ms4w page is available right now. If you need Windows 
binaries, you can also download the version of gisinternals:

https://www.gisinternals.com/release.php
You can quickly download the latest version of ms4w 4.01 here, I just 
put it on our server: https://netgis.de/download/ms4w_4.0.1.zip


Greetings
Sven



Mit freundlichen Grüßen

Sven Schröter

**
NETGIS GbR
Benediktinerstr. 32a
54292 Trier
Tel.: 0651-1704731
Fax: 0651-1704733
schroe...@netgis.de
www.netgis.de


Am 27.09.2019 um 11:41 schrieb KAVALAGIOS Panagiotis (EEAS-EXT):


Dear all,

We would like to investigate the usage of MapServer in a Proof of 
Concept. Where can I find the binaries? The download link to ms4w.com 
causes:


--

Network Error (tcp_error)

A communication error occurred: "Operation timed out"

The Web Server may be down, too busy, or experiencing other problems 
preventing it from responding to requests. You may wish to try again 
at a later time.



For assistance, contact your network support team

--

Is there any other mirror I could try?

Kind regards,

*Panos Kavalagios*

*
*Application Architect

MTS4EEAS (under contract with the EEAS)

*BA.BS.3.IS*

_

Office: EEAS B100 Floor 5 Area F5/048

Rue Belliard 100, 1000 Brussels**

Phone: +32 2 584 6017

panagiotis.kavalag...@ext.eeas.europa.eu 



*cid:image002.jpg@01D4EAFA.CCC51A60***


___
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] WFS PHP Wrapper for POST body Request

2019-08-15 Thread Sven Schroeter

Hi,

I'm using a WFS Wrapper written in PHP with following Code (MS Version 7.x):
...

try {
        $oMap = ms_newMapobj($mymapfile);
    } catch (Exception $e) {
        echo 'Exception: ', $e->getMessage(), "\n";
        ms_ioresethandlers();
        $oMap->free();
        unset($oMap);
        exit;
    }

    $request = ms_newowsrequestobj();


    foreach ($_GET as $k=>$v) {
        $request->setParameter($k, $v);
    }

    foreach ($_POST as $k=>$v) {
        $request->setParameter($k, $v);
    }

    $oMap->owsdispatch($request);
    $contenttype = ms_iostripstdoutbuffercontenttype();

    //Objekt reset
    $oMap->free();
    unset($oMap);

      $buffer = ms_iogetstdoutbufferstring();
      header('Content-Type: application/xml; charset=utf-8');
      echo $buffer;

...

this works fine with GET Request or Post Requests sent from a form.
I have a problem with data I send over the body of a POST request.
So I can get to the data and hand it over, but how?
$postBody = file_get_contents('php://input');

I've already tested it with
$request->loadparams();

Any idea?
Thanks Sven
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Fwd: Re: [MS4W-Users] transparency with php mapscript

2019-05-22 Thread Sven Schroeter

Hi all,

I'm fighting with the SWIG PHP MapScript Opacity again and found a very 
strange behavior.


Here is my test script:

include("../includes/phpmapscriptng-swig/mapscript_70400.php");
$map = new mapObj(MAPFILE_PATH.'test.map');

// set image format
$map->selectOutputFormat("image/jpeg");
$oRasterLayer = $map->getLayerByName('tk_rlp_tms_grau');
$oPolyLayer = $map->getLayerByName('grenzen_vg');

$oRasterLayer->setOpacity(10);
$oRasterLayer->status = MS_ON;

$oPolyLayer->setOpacity(30);
$oPolyLayer->status = MS_ON;

// set image size
$map->setsize(1000,768);
$map->setextent(300497,5495624,366043,5558489);

// Bild im MapServer IMAGEPATH abspeichern.
$image = $map->draw();

//Bildname, Extension und Pfad
$picname = md5(rand());
$picext = ".jpeg";

$picpathname = MS_TMP_PATH.$picname.$picext;

// Bild im MapServer IMAGEPATH abspeichern.
$mapimage = $image->save($picpathname,$map); //URL


$imgurl = MS_TMP_URL.$picname.$picext;

//header('Location: '.$imgurl);

echo '';



If I set the width of the image to a number with 2 zeros at the end 
everything works fine.

e.g. $map->setsize(800,814);
or $map->setsize(1000,768);

as soon as I change the value for the width of the image it often 
doesn't work anymore and the layers don't have transparency anymore.

e.g. $map->setsize(801,814);
or $map->setsize(1011,768);

It is extremely difficult to see a pattern here.
All variants work with the old Mapscript.
Is this a bug?

Thanks + Greeting
Sven


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

[mapserver-users] transparency with php mapscript

2019-05-16 Thread Sven Schroeter

Hello,

I test current php mapscript versions under Windows and try to give a 
layer transparency.


With mapserver versions < 7 this was possible:

$layer_poly->opacity = 68;

With the version MS4W 3.3.1 with Mapserver > 7 and PHP Mapscript it 
works like this:


$layer_poly->updateFromString('LAYER COMPOSITE OPACITY 68 END END');

In the new version MS4W 4.0.0 with the SWIG API I tried the following 
variants:


$layer_poly->opacity = 68;
$layer_poly->setOpacity(68);
$layer_poly->updateFromString('LAYER COMPOSITE OPACITY 68 END END');

In all variants no error message, but also no transparency.

Any ideas?

Thanks Sven




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

[mapserver-users] PHP Mapscript Swig

2019-05-10 Thread Sven Schroeter

Hi,
sorry for the cross-post, but maybe there's someone here who doesn't 
read the ms4w list...


I'm using the new MS4W 4.0.0 and try to build a WMS Wrapper for the new 
PHP Mapscript with Swig.
I am currently writing the complete PHP mapscript code from my client so 
that it runs with both versions, so far this works fine, 
msIO_getStdoutBufferBytes() is the only problem so far...


Here is my Test Code for the last MS4W 3.3.0 with old PHP Mapscript
This works fine trying two example requests with getCapabilities and getMap

#
...

$oMap= ms_newMapObj($mymapfile);

ms_ioinstallstdouttobuffer();

$request = ms_newowsrequestobj();

//Get Request
foreach ($_GET as $k=>$v) {
    $request->setParameter($k, $v);
}

$oMap->owsdispatch($request);
$oMap->free();
unset($oMap);

$contenttype = strtolower(ms_iostripstdoutbuffercontenttype());

//Capabilities Request
if ($contenttype == "application/vnd.ogc.wms_xml; charset=utf-8"){
    header('Content-type: application/xml; charset=utf-8');
    echo ms_iogetstdoutbufferstring();
}

//getMap jpeg
else if ($contenttype == 'image/jpeg'){
    header('Content-type: image/jpeg');
    echo ms_iogetStdoutBufferBytes();
}

...


and here ist the same Code using the new Swig Version:
The getCapabilities Request works fine, not the getMap Request.
I get no picture but only this text:
Resource id #7

#
...

include("../includes/phpmapscriptng-swig/mapscript.php");
$oMap= new mapObj($mymapfile);

msIO_installStdoutToBuffer();

$request = new OWSRequest();

//Get Request
foreach ($_GET as $k=>$v) {
    $request->setParameter($k, $v);
}

$oMap->OWSDispatch($request);

unset($oMap);

$contenttype = strtolower(msIO_stripStdoutBufferContentType());

//Capabilities Request
if ($contenttype == "application/vnd.ogc.wms_xml; charset=utf-8"){
    header('Content-type: application/xml; charset=utf-8');
    echo msIO_getStdoutBufferString();
}

//getMap jpeg
else if ($contenttype == 'image/jpeg'){
    header('Content-type: image/jpeg');
    echo msIO_getStdoutBufferBytes();
}

...


Any idea?

Thanks Sven


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

[mapserver-users] dynamic line pattern

2019-03-27 Thread Sven Schroeter

Hi,

I have a line Layer and want to change the pattern dynamicly from the 
attribute table.

Is it possible?


e.g. I have this working:

    CLASS
 NAME "buslines"
        STYLE
            COLOR [linecolor]
            WIDTH 4
            PATTERN 40 10 END
        END
 END  # CLASS


and I want to get the pattern from an attribute:


    CLASS
 NAME "buslines"
        STYLE
            COLOR [linecolor]
            WIDTH 4
            PATTERN [pattern] END
        END
 END  # CLASS

but this dont work. Any hint?

Thanks
Sven

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

Re: [mapserver-users] What is the best way to generate WMS?

2018-09-21 Thread Sven Schroeter
yep, at this time for me only on a custom build under ubuntu 16.04 using this 
source:
https://github.com/bjoernboldt/mapserver

but I hope for the next release and this pull request:
https://github.com/mapserver/mapserver/pull/5642

Sven



Von: Vladimir [mailto:f...@inbox.ru] 
Gesendet: Freitag, 21. September 2018 16:19
An: Sven Schroeter; 'mapserver-users'
Betreff: Re: AW: AW: [mapserver-users] What is the best way to generate WMS?

Does it work with PHP 7?

Regards.

I have no experience with other programming languages at mapserver, so far I 
only used php and that works well, e.g. I use a wrapper here:
https://geodaten.naturschutz.rlp.de/kartendienste_nature_protection/mod_ogc/

I developed this on the basis of this example:
https://mapserver.org/ogc/mapscript.html

Greetings
Sven


Von: Vladimir [mailto:f...@inbox.ru] 
Gesendet: Freitag, 21. September 2018 13:50
An: Sven Schroeter; 'mapserver-users'
Betreff: Re: AW: [mapserver-users] What is the best way to generate WMS?

Thank you very much, Sven.

Is it right to use FastCGI for less resource consumption?
What language of MapScript is more suitable the best performance?

Regards.

Hi Vladimir,

the fastest way is probably the CGI variant. You write your mapfiles and 
deliver the data via mapserv and the corresponding parameters.
In the case of PHP you have to build a wrapper, which is no problem. If your 
server runs under windows, this is the better variant, because many firewalls 
close when you call mapserv.exe.
When it comes to custom programming, the php (or python or C# or Java) variant 
has more influence.

Greetings
Sven



Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Vladimir
Gesendet: Freitag, 21. September 2018 09:51
An: mapserver-users
Betreff: [mapserver-users] What is the best way to generate WMS?

Hi list,

There are several tables with a lot of objects in PostGis database.
Fields of the tables contain styles(color, width etc)

The goal is fast getting a single image(WMS) on client .
I am aware about two ways to do it:
mapserv as FactCGI and some kind of MapScript(PHP in my case)

What is the best for performance?
Is there more productive way? 

Regards.



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

Re: [mapserver-users] What is the best way to generate WMS?

2018-09-21 Thread Sven Schroeter
o.k. I just tried that, works great on my Windows 7 development environment 
under ms4w, thanks!
Does it work on all Windows Server operating systems and also under the IIS?


Von: Richard Greenwood [mailto:richard.greenw...@gmail.com] 
Gesendet: Freitag, 21. September 2018 15:00
An: schroe...@netgis.de
Cc: f...@inbox.ru; mapserver
Betreff: Re: [mapserver-users] What is the best way to generate WMS?

On Fri, Sep 21, 2018 at 3:33 AM Sven Schroeter  wrote:
Hi Vladimir,

the fastest way is probably the CGI variant. You write your mapfiles and 
deliver the data via mapserv and the corresponding parameters.
In the case of PHP you have to build a wrapper, which is no problem. If your 
server runs under windows, this is the better variant, because many firewalls 
close when you call mapserv.exe.

On a Windows server just rename mapserv.exe to mapserv and all will be good.

Rich


 
When it comes to custom programming, the php (or python or C# or Java) variant 
has more influence.

Greetings
Sven



Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Vladimir
Gesendet: Freitag, 21. September 2018 09:51
An: mapserver-users
Betreff: [mapserver-users] What is the best way to generate WMS?

Hi list,

There are several tables with a lot of objects in PostGis database.
Fields of the tables contain styles(color, width etc)

The goal is fast getting a single image(WMS) on client .
I am aware about two ways to do it:
mapserv as FactCGI and some kind of MapScript(PHP in my case)

What is the best for performance?
Is there more productive way? 

Regards.

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



-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com

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

Re: [mapserver-users] What is the best way to generate WMS?

2018-09-21 Thread Sven Schroeter
wrong URL, this URL for the php mapscript wrapper example:

https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/mod_ogc/

 

 

 

Von: Vladimir [mailto:f...@inbox.ru] 
Gesendet: Freitag, 21. September 2018 13:50
An: Sven Schroeter; 'mapserver-users'
Betreff: Re: AW: [mapserver-users] What is the best way to generate WMS?

 

Thank you very much, Sven.

Is it right to use FastCGI for less resource consumption?
What language of MapScript is more suitable the best performance?

Regards.

 

Hi Vladimir,

the fastest way is probably the CGI variant. You write your mapfiles and 
deliver the data via mapserv and the corresponding parameters.
In the case of PHP you have to build a wrapper, which is no problem. If your 
server runs under windows, this is the better variant, because many firewalls 
close when you call mapserv.exe.
When it comes to custom programming, the php (or python or C# or Java) variant 
has more influence.

Greetings
Sven



Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Vladimir
Gesendet: Freitag, 21. September 2018 09:51
An: mapserver-users
Betreff: [mapserver-users] What is the best way to generate WMS?

Hi list,

There are several tables with a lot of objects in PostGis database.
Fields of the tables contain styles(color, width etc)

The goal is fast getting a single image(WMS) on client .
I am aware about two ways to do it:
mapserv as FactCGI and some kind of MapScript(PHP in my case)

What is the best for performance?
Is there more productive way? 

Regards.

 

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

Re: [mapserver-users] What is the best way to generate WMS?

2018-09-21 Thread Sven Schroeter
I have no experience with other programming languages at mapserver, so far I 
only used php and that works well, e.g. I use a wrapper here:
https://geodaten.naturschutz.rlp.de/kartendienste_nature_protection/mod_ogc/

I developed this on the basis of this example:
https://mapserver.org/ogc/mapscript.html

Greetings
Sven


Von: Vladimir [mailto:f...@inbox.ru] 
Gesendet: Freitag, 21. September 2018 13:50
An: Sven Schroeter; 'mapserver-users'
Betreff: Re: AW: [mapserver-users] What is the best way to generate WMS?

Thank you very much, Sven.

Is it right to use FastCGI for less resource consumption?
What language of MapScript is more suitable the best performance?

Regards.

Hi Vladimir,

the fastest way is probably the CGI variant. You write your mapfiles and 
deliver the data via mapserv and the corresponding parameters.
In the case of PHP you have to build a wrapper, which is no problem. If your 
server runs under windows, this is the better variant, because many firewalls 
close when you call mapserv.exe.
When it comes to custom programming, the php (or python or C# or Java) variant 
has more influence.

Greetings
Sven



Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Vladimir
Gesendet: Freitag, 21. September 2018 09:51
An: mapserver-users
Betreff: [mapserver-users] What is the best way to generate WMS?

Hi list,

There are several tables with a lot of objects in PostGis database.
Fields of the tables contain styles(color, width etc)

The goal is fast getting a single image(WMS) on client .
I am aware about two ways to do it:
mapserv as FactCGI and some kind of MapScript(PHP in my case)

What is the best for performance?
Is there more productive way? 

Regards.


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

Re: [mapserver-users] What is the best way to generate WMS?

2018-09-21 Thread Sven Schroeter
Hi Vladimir,

the fastest way is probably the CGI variant. You write your mapfiles and 
deliver the data via mapserv and the corresponding parameters.
In the case of PHP you have to build a wrapper, which is no problem. If your 
server runs under windows, this is the better variant, because many firewalls 
close when you call mapserv.exe.
When it comes to custom programming, the php (or python or C# or Java) variant 
has more influence.

Greetings
Sven



Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Vladimir
Gesendet: Freitag, 21. September 2018 09:51
An: mapserver-users
Betreff: [mapserver-users] What is the best way to generate WMS?

Hi list,

There are several tables with a lot of objects in PostGis database.
Fields of the tables contain styles(color, width etc)

The goal is fast getting a single image(WMS) on client .
I am aware about two ways to do it:
mapserv as FactCGI and some kind of MapScript(PHP in my case)

What is the best for performance?
Is there more productive way? 

Regards.

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

Re: [mapserver-users] Ideas about how to render over/under roadways/bridges in maps?

2018-09-18 Thread Sven Schroeter
wow, really cool project and interesting configuration, thanks for sharing!
Sven

Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
Auftrag von Edward Mac Gillavry
Gesendet: Dienstag, 18. September 2018 23:58
An: Lime, Steve D (MNIT); Basques, Bob (CI-StPaul);
mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] Ideas about how to render over/under
roadways/bridges in maps?


Check out our MAP files for the City of Amsterdam reference map at 
https://github.com/Amsterdam/mapserver/blob/develop/kbk50.map for the 1:50K
map. The GROUP "lijnen" is the one you are looking for: it renders all
casing from streets to regional thoroughfares, followed by the fills for the
same lines. We then render all railroads and then the highways come last:
again, we render the casings for all lines and then we finish with the fills
in its own layer. This dataset doesn't contain an attribute for z-ordering
unfortunately. 

For the 1:5K and larger, there is the
https://github.com/Amsterdam/mapserver/blob/develop/bgt.map MAP file that
does have an attribute for z-ordering that we use to create views per
z-level, e.g. "bgt.wegdeel_vlak0" for z-level 0.

Results can at https://data.amsterdam.nl/. Hope these MAP files give you
some ideas how to go about rendering transportation networks.

Best,

Edward

From: mapserver-users  on behalf of
Lime, Steve D (MNIT) 
Sent: Tuesday, September 18, 2018 11:03:55 PM
To: Basques, Bob (CI-StPaul); mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Ideas about how to render over/under
roadways/bridges in maps? 
 
Most of the battle is identifying the over/under in the data. Have you got
that figured out?  I’d think it would be a matter of sorting: under, neither
under or over and then over. Probably with no line caps.
 
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On
Behalf Of Basques, Bob (CI-StPaul)
Sent: Tuesday, September 18, 2018 11:14 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Ideas about how to render over/under
roadways/bridges in maps?
 
All, 
 
I’m looking for general techniques in how to best manage rendering of
over/under roadway and rail road bridges, etc.
 
My first thought was to use some sort of special overlay layer to handle
this.  But maybe a database appraoch might be better.  I also start to fall
into the problem of having a lot of transporation related layers,   Streets
and Railroads obviously, but the not the so obvious are Alleys, Sidewalks,
Park Trails/Paths, Bike Routes, tunnels, etc.  
 
How to make these all stack nicely.  I generally maintain these things all
in thier own grouping right now as separate datasets.  They originate from
separate authors and are maintained that way too.  Which is why I was
thinking that a DB approach might be the best to make the Z-indexing work.
 
Thoughts?
 
Thanks
 
bobb
 
 
 
"Reality is merely an illusion, albeit a very persistent one."
- Albert Einstein  
 
 
 

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

Re: [mapserver-users] Out-of-memory error due to huge NTv2 shift-file

2018-01-24 Thread Sven Schroeter
Hello, Michael,

interesting, I have already experimented with the new NTv2 grid for Mannheim 
and we also use Mapserver + Postgis. 
I didn't have the problem you mentioned, but the test system wasn't in 
production yet. We transform the data directly and not on-the-fly. 
Unfortunately, I do not have a solution to the problem you have found, but I 
would be very interested in it.

Greetings
Sven


Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Michael Schulz
Gesendet: Mittwoch, 24. Januar 2018 15:47
An: mapserver-users@lists.osgeo.org
Betreff: [mapserver-users] Out-of-memory error due to huge NTv2 shift-file

Dear mapservers, 

in our region in Germany a new CRS is introduced (ETRS:25832). For cadastral 
precision a NTv2 grid-shift file has been generated. This uses a very fine grid 
and is now 350MB in size. While we tested this file in our dev environment and 
everything worked fine, our production environment is not able to cope with the 
amount of requests, since it seems, that each mapserver process is opening that 
file and soon Out-of-memory errors appear, until the server is not answering 
anymore. Not sure whether each request is causing the .gsb file to be loaded, 
or only requests that actually invoke a reprojection.

I assume that we can reduce the amount of needed reprojections as soon as data 
is permanently projected to the new CRS, but still some on-the-fly projections 
will be necessary. I am looking for good strategies to handle this problem. 
Could anyone give some advice? 


Cheers, Michael

-- 
---
Michael Schulz
Kandelstr. 22


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

Re: [mapserver-users] php mapscript set opacity

2017-12-12 Thread Sven Schroeter
Hi Carlos,

thank you very much, that was the trick and it works great.
Here is my new code (tested with MS 7.07):

if(ms_GetVersionInt() >= 7){
$this_layer->updateFromString('LAYER COMPOSITE OPACITY 
'.$my_layeropacity.' END END');  
}else{
$this_layer->set('opacity', $my_layeropacity);  
}

Greetings
Sven



Von: Carlos Ruiz [mailto:boolean10...@yahoo.com] 
Gesendet: Samstag, 9. Dezember 2017 00:58
An: Sven Schroeter
Betreff: Re: [mapserver-users] php mapscript set opacity

Hi Sven,

I guess this happens because of the new COMPOSITE block:

COMPOSITE
OPACITY 100
END

I remember that I had the same problem, and I had to use 
$layer->updateFromString() to set the opacity. As far as I can recall, this is 
a known issue, no methods to change opacity nor composite are available for PHP 
mapscript.

On Friday, December 8, 2017, 2:20:06 AM CST, Sven Schroeter 
 wrote: 


Hi,

I'm trying to transfer old code from Mapserver  6 to Mapserver 7 and fail to
set the transparency via PHP Mapscript.


my code:
$this_layer->set('opacity', 80);  Works with MS 6, not in MS 7 (the layer
is not displayed here)

$this_layer->set('opacity', 100); Works with MS 6 and MS 7

I have read the Migration guide, but I don't know what to do with it in this
case.

Thanks
Sven

___
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 set opacity

2017-12-08 Thread Sven Schroeter
Hi,

I'm trying to transfer old code from Mapserver  6 to Mapserver 7 and fail to
set the transparency via PHP Mapscript.


my code:
$this_layer->set('opacity', 80);   Works with MS 6, not in MS 7 (the layer
is not displayed here)

$this_layer->set('opacity', 100); Works with MS 6 and MS 7

I have read the Migration guide, but I don't know what to do with it in this
case.

Thanks
Sven

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

Re: [mapserver-users] php mapscript problem

2017-11-27 Thread Sven Schroeter
Carlos,

thanks for your answer.
$oMap->free();
unset($oMap);
doesn't work. Mayby it's a bug?
I found this old issue with C# mapscript on Windows:
https://github.com/mapserver/mapserver/issues/1994

Sven



Von: Carlos Ruiz [mailto:boolean10...@yahoo.com] 
Gesendet: Freitag, 24. November 2017 16:42
An: mapserver-users@lists.osgeo.org; Sven Schroeter
Betreff: Re: [mapserver-users] php mapscript problem

Sven,

I haven't worked with Mapscript and IIS. However, I always free the map before 
unsetting it on PHP

$oMap->free();
unset($oMap);

Why don't you try this and see what happens


On Friday, November 24, 2017, 9:04:16 AM CST, Sven Schroeter 
 wrote: 


Hi,

I write many mapfiles from an application to the file system under Windows
and IIS.
Another script loads this mapfiles and checks if it is the right syntax.
If there is an syntax error in the mapfile I'll get an exeption:

try {
$oMap = ms_newMapobj($mymapfile);
} catch (Exception $e) {
echo 'Exception: ',  $e->getMessage(), "\n";
exit;
}

But after I opened the mapfile with newMapobj I can't delete (with unlink)
or update the file because of a permission denied warnings.
How can I unset the loaded mapfile? Everything I tried did not work. 
Or is there another way to check the syntax of a mapfile (with includes)?

Thanks Sven








___
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 problem

2017-11-24 Thread Sven Schroeter
Hi,

I write many mapfiles from an application to the file system under Windows
and IIS.
Another script loads this mapfiles and checks if it is the right syntax.
If there is an syntax error in the mapfile I'll get an exeption:

try {
$oMap = ms_newMapobj($mymapfile);
} catch (Exception $e) {
echo 'Exception: ',  $e->getMessage(), "\n";
exit;
}

But after I opened the mapfile with newMapobj I can't delete (with unlink)
or update the file because of a permission denied warnings.
How can I unset the loaded mapfile? Everything I tried did not work. 
Or is there another way to check the syntax of a mapfile (with includes)?

Thanks Sven








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

Re: [mapserver-users] php Mapscript queryByAttributes

2017-10-12 Thread Sven Schroeter
Hi Steve and Carlos,

thanks for your support. 

When I understand it correctly, I can not use the IN operator in conjunction 
with queryByAttributes in Mapserver 7 (mapscript) ?
I use this function so far for the transfer of different IDs (whether integer 
or string) to read out a subset of POSTGIS tables.
I have now tried the following and it works:

$qstring = "([gid] = '1' || [gid] = '2' || [gid] = '4' || [gid] = '11')";
$query_layer->queryByAttributes("gid",$qstring,MS_MULTIPLE);

Maybe it is possible to get the IN operator back in the future?

Sven


Von: Lime, Steve D (MNIT) [mailto:steve.l...@state.mn.us] 
Gesendet: Mittwoch, 11. Oktober 2017 23:33
An: Carlos Ruiz; mapserver-users@lists.osgeo.org; Sven Schroeter
Betreff: RE: RE: [mapserver-users] php Mapscript queryByAttributes

Ugh, my bad. At least with the LIKE operator it’s because MapServer doesn’t 
support it. Using a regex should work depending on your back-end. Which reminds 
me, which backend are you using? I need to investigate the IN operator. It 
maybe that I can come up with a work around for Sven using the native SQL that 
worked previously since that can still be set as a processing option. Will 
report back…

Steve

From: Carlos Ruiz [mailto:boolean10...@yahoo.com] 
Sent: Wednesday, October 11, 2017 4:03 PM
To: mapserver-users@lists.osgeo.org; Sven Schroeter ; 
Lime, Steve D (MNIT) 
Subject: Re: RE: [mapserver-users] php Mapscript queryByAttributes

Hey Steve,

> the IN operator works off a delimited list, try queryByAttributes("gid", 
> "([gid] IN ‘100,101’)", MS_MULTIPLE);. Any whitespace > is considered part of 
> the tokens in a list.

I have tried this and it doesn't work. There's a query error because Mapserver 
try to add the following: and ("gid"'100,101')

> This is close, it’s a logical expression but you’re comparing a number 
> against a string. It should be 
> queryByAttributes("municipio", "(‘[municipio]’ LIKE 'G%')", MS_MULTIPLE);

I have tried this and it doesn't work. There's a query error because Mapserver 
try to add the following: and ("municipio"::text'G%')

Maybe this happens because the MS4W version (3.1.3) with Mapserver CGI 7.0.1


On Wednesday, October 11, 2017, 2:31:41 PM CDT, Lime, Steve D (MNIT) 
 wrote: 


The query syntax is given in MapServer expression syntax. I think there’s a 
logical expression for why you’re seeing these results:
 
  queryByAttributes("gid", "gid > 100", MS_MULTIPLE) // does not found anything
 
is evaluated as gid = “gid > 100”. Valid but not what you’re looking for. Your 
last example is the right way to do it - queryByAttributes("gid", "([gid] > 
100)", MS_MULTIPLE);. If MapServer sees the qstring is a logical expression 
then it ignores the qitem.
  queryByAttributes("gid", "100", MS_MULTIPLE) // found one result
 
is evaluated as gid = 100 which makes sense.
 
  queryByAttributes("municipio", "'GUADALAJARA'", MS_MULTIPLE) // found one 
result
 
is evaluated as municipio = GUADALAJARA which makes sense. I don’t think you 
need the interior quotes around GUADALAJARA though.
 
  queryByAttributes("municipio", "municipio LIKE 'G%'", MS_MULTIPLE) // does 
not found anything
 
like the first example this evaluates as municipio = "municipio LIKE 'G%'", not 
what you want. See below…
 
  queryByAttributes("gid", "([gid] IN (100, 101))", MS_MULTIPLE); // query error
 
the IN operator works off a delimited list, try queryByAttributes("gid", 
"([gid] IN ‘100,101’)", MS_MULTIPLE);. Any whitespace is considered part of the 
tokens in a list.
 
  queryByAttributes("municipio", "([municipio] LIKE 'G%')", MS_MULTIPLE); // 
query error
 
This is close, it’s a logical expression but you’re comparing a number against 
a string. It should be queryByAttributes("municipio", "(‘[municipio]’ LIKE 
'G%')", MS_MULTIPLE);
 
Steve
 
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Carlos Ruiz
Sent: Wednesday, October 11, 2017 1:36 PM
To: mapserver-users@lists.osgeo.org; Sven Schroeter 
Subject: Re: [mapserver-users] php Mapscript queryByAttributes
 
Sven,
 
Doing some tests, queryByAttributes does not accept LIKE nor IN, just single 
values or simple operators (I am using PostGIS).
 
queryByAttributes("gid", "gid > 100", MS_MULTIPLE) // does not found anything
queryByAttributes("gid", "100", MS_MULTIPLE) // found one result
queryByAttributes("municipio", "'GUADALAJARA'", MS_MULTIPLE) // found one result
queryByAttributes("municipio", "municipi

[mapserver-users] php Mapscript queryByAttributes

2017-10-11 Thread Sven Schroeter
Hi,

Old Server: PHP 5.4.36 with MS 6.4.1 (MS4W)
New Server: PHP 5.6.31 with MS 7.0.6 (MS4W 3.2.2)

My Test Script:

$qfield = 'gid';
$qstring = "gid IN (1,2,3)";
@$datQuery = $query_layer->queryByAttributes($qfield,$qstring,MS_MULTIPLE);

Works fine on the old Server, on the new Server no result.

I have tried to change the query expression, i.e.:
$qstring = "('[gid]' in '1,2,3')";

No result on old server and new...

How can I get it run on MS7?



Thanks + greetings 
Sven 
 


**
NETGIS GbR
Benediktinerstr. 32a
54292 Trier
Tel.: 0651-1704731
Fax: 0651-1704733
schroe...@netgis.de
www.netgis.de


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

[mapserver-users] getExtent for Postgis Layer

2015-03-12 Thread Sven Schroeter
Hi, 
I try to get the extent of my layers using php mapscript:

$map= ms_newMapObj($mapfilepath.'\map.map');
$mylayer = $map->getLayerByName($getlayer);
$layerextent = $mylayer->getExtent();

echo $layerextent->minx." ".$layerextent->miny." ".$layerextent->maxx."
".$layerextent->maxy;

This works fine for layers with shapefiles, but there comes no result for my
postgis layers.
Any idea?

Sven



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


[mapserver-users] OFFSITE and RESAMPLE in MS 6

2014-02-20 Thread Sven Schroeter
Hi,
I changed a project from MapServer 5.6 to MapServer 6.0.2.
I have the problem, that my raster layers look bad, because PROCESSING
RESAMPLE is ignored for rotated GeoTIFF images when OFFSITE is set.
When I take the "OFFSITE 255 255 255" line out, then the RESAMPLE=AVERAGE
setting works and my raster layers look fine, but naturally the single
raster images overlap each other, so I there are white triangles at the
borders/corners.
The same Problem was already posted some times.
I think it could be the wrong sequence of the operations. Maybe in MS 5.6 it
was different?
Is there a solution for it in MS 6?

Greetings
Sven



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


[mapserver-users] MS4W Mapcache

2013-12-18 Thread Sven Schroeter
Hi,

I'm testing the MapCache Apache Module from MapServer for Windows (MS4W
3.1.0-beta1)
Works fine with the cache types disk, sqlite and tiff.
Now I try to create a Cache for Offline with OpenLayers.
I want to create a cache in the structure /z/x/y.png but using a template
for the cache type disk, it's impossible to restart Apache.

   

C:/ms4w/tmp/ms_tmp/cache/{tileset}/{grid}/{z}/{x}/{y}.{ext}
  
   

Also the cache type mbtiles doesen't work


   C:/ms4w/tmp/ms_tmp/cache/test.mbtiles


So I try now on a linux machine, but it would be great if it would work for
our customers on windows too.
Any idea?
Thanks
Sven







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


AW: [mapserver-users] MapServer Docs in Android Market

2011-07-28 Thread Sven Schroeter
Hi Steve,

her is the eclipse project for compiling the app:
http://www.netgis.de/download/MapServerDoc.zip
In the folder \assets\www is the webapp.
You can use it for integrate it into the main page (maybe with a link to the
app in the market)
Greetings
Sven
 


Von: Steve Lime [mailto:sdl...@gmail.com] 
Gesendet: Mittwoch, 20. Juli 2011 17:57
An: schroe...@netgis.de
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] MapServer Docs in Android Market

Looks great! How should we integrate into the main website?

Steve
On Sat, Jul 9, 2011 at 7:11 AM,  wrote:
Hi all,
here's my MapServer docs App for android in the market:
https://market.android.com/details?id=com.netgis.mapserver_doc&hl=en
Or search on your phone in the market for "mapserver".
Greetings
Sven



___
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 docs mobile app

2011-06-20 Thread Sven Schroeter
Hi all,

I'm playing with jquery mobile and phonegap and needed an example for a
"Documentation App".
So I have downloaded for test purposes the Mapfile documentation and changed
the HTML and CSS a little bit.
Now here is a Mapfile Documentation for mobile devices (android 2.2, tested
on a HTC Desire HD):
http://www.netgis.de/mapserver_mdoc/mapserver_mdoc.zip
(mapserver_mdoc.apk in a zip)

The "webapp" you can find here:
http://www.netgis.de/mapserver_mdoc/

If you want, I can upload the app in the android market.
Maybe you can give feedback how it works on other android devices?
Thanks and greetings
Sven



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


[mapserver-users] OFFSITE more values

2010-09-24 Thread Sven Schroeter

Hi,

I have a rasterlayer with more than 1000 .ecw airial photos and want to set 
more than one RGB-value transparent with OFFSITE.

This works fine:
OFFSITE 0 0 0

but I need something like this:
OFFSITE [0 0 0,1 1 1,1 2 1]

Is there a possibility to solve my problem?

Sven 



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


Re: [mapserver-users] mapserver >= 5.6 and querys via php-mapscript

2010-06-10 Thread Sven Schroeter
Hi Daniel,
>
> I don't think there is any way to get the "real" shapeindex unless you 
> have an id field in the data itself. You could file a ticket about this, 
> but for some data sources, such as Postgis, Oracle Spatial, and many OGR 
> ones, there is no concept of absolute record id, so if something was 
> added, it would very likely work only for shapefiles
>

in the older ms versions I got with $result->shapeindex an absolute record 
id for all data sources (postgis, OGR, shapefiles).
what ids were used before by default e.g. for postgis data?
why this concept has changed in the new version 5.6?
Thanx
Sven___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] setting up raster queries

2010-06-10 Thread Sven Schroeter

setting up raster queriesHi,

use MS_MULTIPLE and MS_SINGLE
e.g. with php-mapscript:
If you want only one result use
$datQuery = $layer->queryByPoint($qPoint, MS_SINGLE, 1);
if you want more results:
$datQuery = $layer->queryByPoint($qPoint, MS_MULTIPLE, 1);

Greetings
Sven


- Original Message - 
From: Mark Volz

To: mapserver-users@lists.osgeo.org
Sent: Thursday, June 10, 2010 4:09 PM
Subject: [mapserver-users] setting up raster queries


Hello,
I have a DEM file on my map so that users can click identify and get the 
elevation for the location.  The query works however I get anywhere between 
0 to 2 records returned.  Is there a way to return only a single record on a 
query?

Thanks
Mark Volz
GIS Specialist
Lyon County, MN



___
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 >= 5.6 and querys via php-mapscript

2010-06-10 Thread Sven Schroeter

Hi,
I'm still fighting with mapserver >= 5.6 and querys via php-mapscript.
My code for e.g. making a queryByRect works fine since I use resultsGetShape 
instead of getShape for version 5.6:


//query
@$datQuery = $query_layer->queryByRect($qRect);

//number of objects
$resnum = $query_layer->getNumResults();
echo "number of objects: ".$resnum."";

//if query success
if ($datQuery == MS_SUCCESS) {

//check ms version
 if (ms_GetVersionInt() < 50600){
$query_layer->open();
 }

 //write table
 echo '';

 for ($j=0; $j<$query_layer->getNumResults(); $j++) {
  $result = $query_layer->getResult($j);

 //check ms version
 if (ms_GetVersionInt() < 50600){
$shpobj = $query_layer->getShape($result->tileindex,$result->shapeindex);
}
 else{
$shpobj = 
$query_layer->resultsGetShape($result->shapeindex,$result->tileindex);

 }

  $si = $result->shapeindex;
  $attr = $shpobj->values;
  echo ''.$si.'';
  foreach($attr as $name=>$wert) {
   echo ''.$wert.'';
  }
  echo '';
  $shpobj->free();
 }
//check ms version
if (ms_GetVersionInt() < 50600){
$query_layer->close();
}
echo '';
} // end success

My problem: using ms 5.6 the shapeindex ($result->shapeindex;) is only an 
temporal arrayindex (0-x) and not the "real" shapeindex I get with 
mapserverversions < 5.6.
How can I get the "real" shapindex of my shapes using ms 5.6? I need this 
for pointing on single shapes in another program.


Thanks
Sven


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


Re: [mapserver-users] rasterquery

2010-06-10 Thread Sven Schroeter

Frank,

thank you for the hint, I have found that it only doesn't work with a ESRI 
Grid.

With a .tif / geotif the rasterquery works without problems. Is this a bug?

Greetings
Sven



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


[mapserver-users] rasterquery

2010-06-09 Thread Sven Schroeter

Hi,
I try to make a raster query using phpmapscript
My layer in the mapfile:

# DHM ESRI Grid
LAYER
NAME "mydhm"
DATA "dhm_vg/grid/dhm_vg" #grid dir
STATUS default
TYPE RASTER
TEMPLATE "template/query.html"
END

My php code:

//load mapfile
$map= ms_newMapObj($mapfilepath.'\map.map');

//create point
$qPoint = ms_newPointObj();
$qPoint->setXY(2554032,5521435);

//set layer
$layer = $map->getLayerByName("mydhm");

//query
@$datQuery = $layer->queryByPoint($qPoint, MS_SINGLE, 1);

if ($datQuery == MS_SUCCESS) {
 echo "OK!";
}

this works fine with mapserver 5.02 but there is no result  with mapserver 
5.6.1


apServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS 
SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS INPUT=OGR 
INPUT=GDAL INPUT=SHAPEFILE


Any idea?
Sven 



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


[mapserver-users] OGR/PHP Extension encoding

2010-05-26 Thread Sven Schroeter

Hi,
I'm using the OGR/PHP Extension to convert data from a postgis database to 
ESRI Shape by using the actual extent of my mapclient.
This works fine, you can test the "Export-Button" (in the left panel) on my 
client, choose for example "Naturschutzgebiete" in the dropdown of the 
export-dialog:

http://map1.naturschutz.rlp.de/mapserver_lanis/
My database is utf-8 encoded and I want to export my attribute-data to 
Latin1.

Is there a possibility to tell  ogr via php to change the encoding?
With pgsql2shp I can set PGCLIENTENCODING=LATIN1 and it works. This doesent 
work with ogr2ogr.

Any idea?
Thanks
Sven 



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


Re: [mapserver-users] php mapscript

2010-03-29 Thread Sven Schroeter

Hi,
thank you very much, shapeObj resultsGetShape is the solution.
resultsGetShape works fine.
But I don't understand why shapeObj getFeature is in the documentation?

Sven


- Original Message - 
From: Worth Lutz

To: 'Sven Schroeter' ;
Sent: Friday, March 26, 2010 11:09 PM
Subject: RE: [mapserver-users] php mapscript


This problem is due to the new single pass query in 5.6.

I have marked your code with what I am using.

Try these mods marked with "*":


@$datQuery = $query_layer->queryByRect($qRect);

//number of objects
$resnum = $query_layer->getNumResults();  echo "number of objects: 
".$resnum."";


//if query success
if ($datQuery == MS_SUCCESS) {
//  $query_layer->open();  // <getResult(0);


 //$shpobj = 
$query_layer->getShape($result->tileindex,$result->shapeindex);
 // resultsGetShape is now the way to get the shape object 
***
 // note: change of order in arguments 

 $shpobj = $query_layer->resultsGetShape($result->shapeindex, 
$result->tileindex);



 //read attribute
 $attr = $shpobj->values;

 //write headline
 echo '';
 foreach($attr as $name=>$wert) {
  echo ''.$name.'';
 }
 echo '';

 //write datasets
 for ($j=0; $j<$query_layer->getNumResults(); $j++) {
  $result = $query_layer->getResult($j);


  //$shpobj = 
$query_layer->getShape($result->tileindex,$result->shapeindex);
  // see note above 
**
  $shpobj = $query_layer->resultsGetShape($result->shapeindex, 
$result->tileindex);



  $ri = $result->tileindex;
  $si = $result->shapeindex;
  $attr = $shpobj->values;
  echo '';
  foreach($attr as $name=>$wert) {
   echo ''.$wert.'';
  }
  echo '';
  $shpobj->free();
 }
//  $query_layer->close();  // <';

} // end success
...


-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Sven Schroeter

Sent: Thursday, March 25, 2010 10:52 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] php mapscript

Alan,
thanks for the reply, I tried it with getFeature(), but there comes the same
error.
nextShape() works only after msWhichShapes and here I need a rectobj.
But I want to use the script for queryByShape and queryByAttributes too.
Why there comes no array in $attr = $shpobj->values; ?
Any idea?
Sven

- Original Message - 
From: "Alan Boudreault" 

To: 
Cc: "Sven Schroeter" 
Sent: Thursday, March 25, 2010 2:32 PM
Subject: Re: [mapserver-users] php mapscript



Sven,

getShape() is deprecated. Use rather getFeature(). I suggest to also take
a
look at the nextShape() function:
http://mapserver.org/mapscript/php/index.html#layerobj-class

Alan

On March 25, 2010 09:18:50 am Sven Schroeter wrote:

Hi,
I have an old php mapscript code that works fine with mapserver 5.02 or
 5.2, but not with 5.6.1.
The code runs an attribute tabe from a postgis layer and different querys
i.e. queryByRect:

...
@$datQuery = $query_layer->queryByRect($qRect);

 //number of objects
 $resnum = $query_layer->getNumResults();
 echo "number of objects: ".$resnum."";

 //if query success
if ($datQuery == MS_SUCCESS) {
  $query_layer->open();

  //first row
  $result = $query_layer->getResult(0);
  $shpobj =
$query_layer->getShape($result->tileindex,$result->shapeindex);
  //read attribute
  $attr = $shpobj->values;

  //write headline
  echo '';
  foreach($attr as $name=>$wert) {
   echo ''.$name.'';
  }
  echo '';

  //write datasets
  for ($j=0; $j<$query_layer->getNumResults(); $j++) {
   $result = $query_layer->getResult($j);
   $shpobj =
 $query_layer->getShape($result->tileindex,$result->shapeindex); $ri =
 $result->tileindex;
   $si = $result->shapeindex;
   $attr = $shpobj->values;
   echo '';
   foreach($attr as $name=>$wert) {
echo ''.$wert.'';
   }
   echo '';
   $shpobj->free();
  }
  $query_layer->close();
  echo '';

} // end success
...

In ms 5.6.1 the query is also successful (I get the correct number of
objects) but there comes following warning:
Invalid argument supplied for foreach() in ... Fatal error: Call to a
 member function free() on a non-object in ...
No object? Why? What has changed?
Thanks
Sven



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



--
Alan Boudreault
Mapgears
http://www.mapgears.com






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




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


Re: [mapserver-users] php mapscript

2010-03-25 Thread Sven Schroeter

Alan,
thanks for the reply, I tried it with getFeature(), but there comes the same 
error.

nextShape() works only after msWhichShapes and here I need a rectobj.
But I want to use the script for queryByShape and queryByAttributes too.
Why there comes no array in $attr = $shpobj->values; ?
Any idea?
Sven

- Original Message - 
From: "Alan Boudreault" 

To: 
Cc: "Sven Schroeter" 
Sent: Thursday, March 25, 2010 2:32 PM
Subject: Re: [mapserver-users] php mapscript



Sven,

getShape() is deprecated. Use rather getFeature(). I suggest to also take 
a

look at the nextShape() function:
http://mapserver.org/mapscript/php/index.html#layerobj-class

Alan

On March 25, 2010 09:18:50 am Sven Schroeter wrote:

Hi,
I have an old php mapscript code that works fine with mapserver 5.02 or
 5.2, but not with 5.6.1.
The code runs an attribute tabe from a postgis layer and different querys
i.e. queryByRect:

...
@$datQuery = $query_layer->queryByRect($qRect);

 //number of objects
 $resnum = $query_layer->getNumResults();
 echo "number of objects: ".$resnum."";

 //if query success
if ($datQuery == MS_SUCCESS) {
  $query_layer->open();

  //first row
  $result = $query_layer->getResult(0);
  $shpobj = 
$query_layer->getShape($result->tileindex,$result->shapeindex);

  //read attribute
  $attr = $shpobj->values;

  //write headline
  echo '';
  foreach($attr as $name=>$wert) {
   echo ''.$name.'';
  }
  echo '';

  //write datasets
  for ($j=0; $j<$query_layer->getNumResults(); $j++) {
   $result = $query_layer->getResult($j);
   $shpobj =
 $query_layer->getShape($result->tileindex,$result->shapeindex); $ri =
 $result->tileindex;
   $si = $result->shapeindex;
   $attr = $shpobj->values;
   echo '';
   foreach($attr as $name=>$wert) {
echo ''.$wert.'';
   }
   echo '';
   $shpobj->free();
  }
  $query_layer->close();
  echo '';

} // end success
...

In ms 5.6.1 the query is also successful (I get the correct number of
objects) but there comes following warning:
Invalid argument supplied for foreach() in ... Fatal error: Call to a
 member function free() on a non-object in ...
No object? Why? What has changed?
Thanks
Sven



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



--
Alan Boudreault
Mapgears
http://www.mapgears.com






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


[mapserver-users] php mapscript

2010-03-25 Thread Sven Schroeter

Hi,
I have an old php mapscript code that works fine with mapserver 5.02 or 5.2, 
but not with 5.6.1.
The code runs an attribute tabe from a postgis layer and different querys 
i.e. queryByRect:


...
@$datQuery = $query_layer->queryByRect($qRect);

//number of objects
$resnum = $query_layer->getNumResults();
echo "number of objects: ".$resnum."";

//if query success
if ($datQuery == MS_SUCCESS) {
 $query_layer->open();

 //first row
 $result = $query_layer->getResult(0);
 $shpobj = $query_layer->getShape($result->tileindex,$result->shapeindex);
 //read attribute
 $attr = $shpobj->values;

 //write headline
 echo '';
 foreach($attr as $name=>$wert) {
  echo ''.$name.'';
 }
 echo '';

 //write datasets
 for ($j=0; $j<$query_layer->getNumResults(); $j++) {
  $result = $query_layer->getResult($j);
  $shpobj = $query_layer->getShape($result->tileindex,$result->shapeindex);
  $ri = $result->tileindex;
  $si = $result->shapeindex;
  $attr = $shpobj->values;
  echo '';
  foreach($attr as $name=>$wert) {
   echo ''.$wert.'';
  }
  echo '';
  $shpobj->free();
 }
 $query_layer->close();
 echo '';

} // end success
...

In ms 5.6.1 the query is also successful (I get the correct number of 
objects) but there comes following warning:
Invalid argument supplied for foreach() in ... Fatal error: Call to a member 
function free() on a non-object in ...

No object? Why? What has changed?
Thanks
Sven 




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


[mapserver-users] MS4W

2010-03-18 Thread Sven Schroeter

Hi,
the actual MS4W is v3.0 Beta 10 (Jan 27, 2010)
Is there planned a  new stable relaese in the near future?
thanks
Sven


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


[mapserver-users] arithmethic rotation values

2010-01-29 Thread Sven Schroeter

Hi,
I have this layer:

LAYER
 NAME "kanal_fliess_haltung"
 TYPE point
 STATUS on
 DATA kanal/Fliesspfeil.shp
 CLASS 
  STYLE  
   SYMBOL 'triangle'

   SIZE 10
   COLOR 0 0 0
   ANGLE [Drehung]
  END
END
END

In my ange-field there are arithmethic rotation values, not geographic.
So my symbol gets the wrong rotation. Any idea to solve the problem?

Thanks
Sven


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


[mapserver-users] layer extent

2009-10-21 Thread Sven Schroeter
Hi,

I try to get the layerextent with php mapscript (mapserver 5.02 on Windows):

$layer = $map->getLayerByName($qlayer);
$extentobj = $layer->getExtent();

echo $extentobj->minx." ".$extentobj->miny." ".$extentobj->maxx." 
".$extentobj->maxy;

This works fine with shape-layers but not with postgis. How can I do this?
Thanks
Sven

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


Re: [mapserver-users] ms_newprojectionobj

2009-07-03 Thread Sven Schroeter

Hi Jeff,
thank you for your reply.

I got the failure:
in my proj-file the epsgcode is following:

<31466> +proj=tmerc +lat_0=0 +lon_0=6 +k=1.00 +x_0=250 +y_0=0 
+ellps=bessel +units=m +no_defs  no_defs <>


But it must be:

<31466> +proj=tmerc +lat_0=0 +lon_0=6 +k=1.00 +x_0=250 +y_0=0 
+ellps=bessel +datum=potsdam +units=m +no_defs  <>



There is no definition of the datum. That makes the wrong coordinates.
I didn't see it because one Server had a PROJ_NAD System variable on the 
correct proj-file


Sven


- Original Message - 
From: "Jeff McKenna" 

To: 
Sent: Friday, July 03, 2009 1:41 PM
Subject: Re: [mapserver-users] ms_newprojectionobj



Sven Schroeter wrote:


What is wrong with the second installation? Is there a different 
geosversion, how can I test this?


You could test it on both servers with a Windows package like MS4W 
(http://www.maptools.org/ms4w), so you are sure that the same library 
versions are used.


-jeff



--
Jeff McKenna
FOSS4G 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


Re: [mapserver-users] ms_newprojectionobj

2009-07-03 Thread Sven Schroeter

Hi,

thanks for the hint, but I checkt the proj already, it's the same.
I work with Windows and have the same proj-dir under C:\proj installed on 
both servers.

Any idea?

Sven



- Original Message - 
From: "Milo van der Linden" 

To: "Sven Schroeter" 
Cc: 
Sent: Friday, July 03, 2009 12:00 PM
Subject: Re: [mapserver-users] ms_newprojectionobj



Hello Sven,

I suggest you search for a file called epsg on both systems. It is a
text file containing EPSG projection parameters.
Search both for <31466> and  <4326>
Compare the lines and check to see they match.

Good luck!

Sven Schroeter wrote:

Hi,

I'm using php-mapscript to project a point from epsg:31466
(Gauss-Krueger-Zone2) to epsg:4326 (WGS84):

//create point
$qPoint = ms_newPointObj();
$qPoint->setXY(2521189,5541667);

// Calculate -> WGS84
$projInObj = ms_newprojectionobj("init=epsg:31466");
$projOutObj = ms_newprojectionobj("init=epsg:4326");
$qPoint->project($projInObj, $projOutObj);
$WGS_X = round($qPoint->x,6);
$WGS_Y = round($qPoint->y,6);
echo 'WGS84: '.$WGS_Y.','.$WGS_X.' ';

I let the script running on two diferent Servers with the same
Mapserver-Installation:

The first Server calculates the correct coordinates:
WGS84: 50.010907,6.295043

http://maps.google.de/maps?f=q&source=s_q&hl=de&geocode=&q=50.010907,6.295043&t=h&ie=UTF8&ll=50.010907,6.295043&spn=0.009542,0.015407&z=16&iwloc=near



The second server calculates the wrong coordinates:
WGS84: 50.012688,6.295651

http://maps.google.de/maps?f=q&source=s_q&hl=de&geocode=&q=50.012688,6.295651&t=h&ie=UTF8&ll=50.012688,6.295651&spn=0.009542,0.015407&z=16&iwloc=near


Both Servers have the same Mapscriptversion:
MapServer version 5.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

What is wrong with the second installation? Is there a different
geosversion, how can I test this?
Thanks
Sven



___
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] ms_newprojectionobj

2009-07-03 Thread Sven Schroeter

Hi,

I'm using php-mapscript to project a point from epsg:31466 
(Gauss-Krueger-Zone2) to epsg:4326 (WGS84):


//create point
$qPoint = ms_newPointObj();
$qPoint->setXY(2521189,5541667);

// Calculate -> WGS84
$projInObj = ms_newprojectionobj("init=epsg:31466");
$projOutObj = ms_newprojectionobj("init=epsg:4326");
$qPoint->project($projInObj, $projOutObj);
$WGS_X = round($qPoint->x,6);
$WGS_Y = round($qPoint->y,6);
echo 'WGS84: '.$WGS_Y.','.$WGS_X.' ';

I let the script running on two diferent Servers with the same 
Mapserver-Installation:


The first Server calculates the correct coordinates:
WGS84: 50.010907,6.295043

http://maps.google.de/maps?f=q&source=s_q&hl=de&geocode=&q=50.010907,6.295043&t=h&ie=UTF8&ll=50.010907,6.295043&spn=0.009542,0.015407&z=16&iwloc=near


The second server calculates the wrong coordinates:
WGS84: 50.012688,6.295651

http://maps.google.de/maps?f=q&source=s_q&hl=de&geocode=&q=50.012688,6.295651&t=h&ie=UTF8&ll=50.012688,6.295651&spn=0.009542,0.015407&z=16&iwloc=near

Both Servers have the same Mapscriptversion:
MapServer version 5.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER 
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS 
INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


What is wrong with the second installation? Is there a different 
geosversion, how can I test this?

Thanks
Sven



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


Re: [mapserver-users] GetFeatureInfo in XML

2009-05-06 Thread Sven Schroeter

Pål ,
I use a simple XML-File with CGI-Variables ([myvar]) like this:



 
   Naturschutzgebiet
   [name]
   [objnr]
   
http://www.naturschutz.rlp.de/dokumente/rvo/[objnr].htm
   [schutzzone]
   [erfassungsgrundlage]
   
http://www.naturschutz.rlp.de/Impressum.natur?ActiveID=1234
 


If  there is a request for xml I tell my script to set the response-header 
is XML:


...
 $buffer = ms_iogetstdoutbufferstring();
   header('Content-type: text/xml');
   echo $buffer;
...

Greetings Sven



- Original Message - 
From: "paalkr" 

To: 
Sent: Tuesday, May 05, 2009 11:01 PM
Subject: Re: [mapserver-users] GetFeatureInfo in XML



Hi!

This is something that I'm interested in as well, could I please ask you to
share your featureinfo_nsg.xml? I would like to have a look at it to get
some hints on how to set up a XML template.

BTW: I think you can expose a new InfoFormat by setting the
wms_feature_info_mime_type keyword in the web metadata section of your
mapfile.

Regards,
Pål Kristensen



Sven Schroeter wrote:


Hi all,
I am currently experimenting with Web Map Services and a custom PHP
wrapper.
In this script for a GetFeatureInfo-Request with
info_format=application/vnd.ogc.wms_xml or  info_format=text/xml a XML
document is generated.
This works well, a XML-template is set in the mapfile dynamically:
...
if($k == 'info_format' & ($v == 'application/vnd.ogc.wms_xml' || $v ==
'text/xml')){
 $layer = $oMap->getLayerByName($layername);
 $layer->set("template", "template/featureinfo_nsg.xml");
...
}
...

Two questions:
1. Is it possible to get a featureInfo-Request in xml native by mapserver
(no gml)
2. How can I tell mapserver to enhance the list of capabilities to xml? At
this time there comes only
...

text/plain
text/html
application/vnd.ogc.gml

...

Thanks
Sven





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





-

Regards,
Pål Kristensen
--
View this message in context: 
http://n2.nabble.com/GetFeatureInfo-in-XML-tp2787413p2806255.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] GetFeatureInfo in XML

2009-05-04 Thread Sven Schroeter

Hi all,
I am currently experimenting with Web Map Services and a custom PHP wrapper.
In this script for a GetFeatureInfo-Request with 
info_format=application/vnd.ogc.wms_xml or  info_format=text/xml a XML 
document is generated.

This works well, a XML-template is set in the mapfile dynamically:
...
if($k == 'info_format' & ($v == 'application/vnd.ogc.wms_xml' || $v == 
'text/xml')){

$layer = $oMap->getLayerByName($layername);
$layer->set("template", "template/featureinfo_nsg.xml");
   ...
   }
...

Two questions:
1. Is it possible to get a featureInfo-Request in xml native by mapserver 
(no gml)
2. How can I tell mapserver to enhance the list of capabilities to xml? At 
this time there comes only

...

text/plain
text/html
application/vnd.ogc.gml

...

Thanks
Sven





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


[mapserver-users] ArcSDE-Support for php mapscript

2009-03-17 Thread Sven Schroeter

Hi all,
My customers System:
Windows 2003 Server with IIS 6, PHP 5.2.5
MapServer version 5.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER 
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS 
INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
I use mapserver only via php-mapscript and want to get an ArcSDE-Layer 
(Version 9.1).

How can I get ArcSDE-Support for php mapscript?

Thanks
Sven 



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


[mapserver-users] apache warning TIFFReadDirectory

2009-03-16 Thread Sven Schroeter

Hi,
I'm working with MapServer version 5.0.2 (php mapscript) on a Apache 2.2.4 
webserver.

Everything works fine but Apache logs following warning:

Warning 1:
TIFFReadDirectory:Unknown field with tag 37522 (0x9292) encountered

I'm using raster-data (.tif with .tfw) in an image catalogue.
Any idea?
Thanks
Sven 



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


[mapserver-users] get connectiontyp via mapscript

2009-03-05 Thread Sven Schroeter

Hi all,

I try to get the connectiontyp via mapscript, this works:

$layer = $map->getLayerByName($qlayer);
$contyp = $layer->connectiontype;

I get back a "1" for shapefiles and a "6" for Postgis-layers.

Where can I find the other types?

Thanks
Sven

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


[mapserver-users] incorrect minscale using php mapscript

2009-02-17 Thread Sven Schroeter

Hi all,

I'm using php mapscript (MS 5.2.1 on Windows) in my client and have problems 
with the minscale from the WEB-Section of my mapfile.


For example if I set
MINSCALE 1

on an imgsize with 1618 x 907 pixels the minscale for creating an image is 
17848

on an imgsize with  822 x 503  pixels the minscale is 16355

I get the same wrong scale setting the minscale with mapscript:
$map->web->set(minscale, 1);

where is the error?

Thanks
Sven 



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


Re: [mapserver-users] Displaying points on the map only for certaintime period

2008-09-25 Thread Sven Schroeter

Hi,
that depends on your client application. For example you can update the map 
via php-mapscript with  ajax. For a periodical request I use the prototype 
javascript framework:

http://www.prototypejs.org/api/ajax/periodicalUpdater

greetings
Sven

- Original Message - 
From: ramya srinivasan

To: mapserver-users@lists.osgeo.org
Sent: Thursday, September 25, 2008 8:17 AM
Subject: [mapserver-users] Displaying points on the map only for certaintime 
period



Hi,
   I have to display a point on the map only for 5 seconds. After 5 seconds 
the second point from the database should be retrieved from the database 
and displayed.This process continues till all the points in the database is 
displayed.Can anyone tell me how to do this..


Thanks.





___
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] query case insensitive

2008-09-24 Thread Sven Schroeter

Hi all,

I'm using the queryByAttributes-function of PHP-Mapscript with the LIKE (~) 
operator for strings (out of a POSTGIS-table):


$queryString = "nom_bande ~ 'WT'";
$queryItem = "nom_bande";
@$datQuery = $layer->queryByAttributes($queryitem,$queryString,MS_MULTIPLE);

Every dataset that contains 'WT' comes as result. But this is case 
sensitive, if I try

$queryString = "nom_bande ~ 'wt'";
there is no result.

Is it possible to make the query case insensitive?

Thanks
Sven 



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


Re: [mapserver-users] GetFeatureInfo for number in textfield

2008-09-02 Thread Sven Schroeter

Steve,
it's really the problem with the template substitution string, with "mynr" 
it works, thank you very much!

Sven

- Original Message - 
From: "Steve Lime" <[EMAIL PROTECTED]>

To: ; <[EMAIL PROTECTED]>
Sent: Tuesday, September 02, 2008 12:48 AM
Subject: Re: [mapserver-users] GetFeatureInfo for number in textfield


nr is also a template substitution string (means number of results) in 
mapserver templates so I'm guessing
that's being returned instead of the column values. A value of 1 for every 
result seems to confirm that. The
work around would be to rename the column in your SQL statement (eg "nr as 
mynr").


Steve


"Sven Schroeter" <[EMAIL PROTECTED]> 09/01/08 10:54 AM >>>

Hi,
My System: Mapserver 5.02 on Win 2003 Server with Postgres/Postgis 8.3/1.3.
I make a GetFeatureInfo Request from a WMS-Service:

With
INFO_FORMAT=text/plain
every field from my Postgis-table comes with a correctly result:
For example

GetFeatureInfo results:

Layer 'naturschutzgebiet'
 Feature 13288152:
   geodb_oid = '175'
   objectid = '175'
   nr = '23308'
   name = 'Ernstberg'
   ...

The Field "nr" is a textfield with some numbers as strings, for example nr
= '23308'.
If I try to get a result via html-template (INFO_FORMAT=text/html)
everything works fine except the field "nr".
For this field I get in every query a "1".

any ideas?

Thanks
Sven


___
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] GetFeatureInfo for number in textfield

2008-09-01 Thread Sven Schroeter

Hi,
My System: Mapserver 5.02 on Win 2003 Server with Postgres/Postgis 8.3/1.3.
I make a GetFeatureInfo Request from a WMS-Service:

With
INFO_FORMAT=text/plain
every field from my Postgis-table comes with a correctly result:
For example

GetFeatureInfo results:

Layer 'naturschutzgebiet'
 Feature 13288152:
   geodb_oid = '175'
   objectid = '175'
   nr = '23308'
   name = 'Ernstberg'
   ...

The Field "nr" is a textfield with some numbers as strings, for example nr 
= '23308'.
If I try to get a result via html-template (INFO_FORMAT=text/html) 
everything works fine except the field "nr".

For this field I get in every query a "1".

any ideas?

Thanks
Sven 



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


[mapserver-users] toWKT() method

2008-07-14 Thread Sven Schroeter
Hi all,

I'm using PHP-Mapscript with GEOS (Mapserver 5) to get a WKT-String from a 
POSTGIS-Table:

$mywkt = $shpobj->toWKT();

Everything works fine for POLYGON, LINESTRING and POINT - tables.
If I try the "toWKT()" Method for MULTIPOLYGON-Tables I get back a POLYGON 
WKT-String.
What can I do?

Thanks,
Sven

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


Re: [mapserver-users] Accessing raster cell values

2008-05-29 Thread Sven Schroeter

Hi,

if you have access to  the mapfile, you can make a queryByPoint  with
mapscript (i.e with an ajax-function)
You have to send your point-coordinats to the script like this:

$coord = split(',',$_POST["coord"]);
dl('php_mapscript.dll');

//load mapfile
$map= ms_newMapObj($mapfilepath.'\yourmap.map');

//create point
$qPoint = ms_newPointObj();
$qPoint->setXY($coord[0]*1,$coord[1]*1);

//set layer
$layer = $map->getLayerByName("your_rasterlayer");

//Pointquery (Single)
@$datQuery = $layer->queryByPoint($qPoint, MS_SINGLE, 1);

//if success
if ($datQuery == MS_SUCCESS) {
for ($j=0; $j<$layer->getNumResults(); $j++) {
   $result = $layer->getResult($j);
  $layer->open();
  $shpobj = $layer->getShape($result->tileindex,$result->shapeindex);
  $attr = $shpobj->values;
  //echo round($attr["value_0"],2);
  $rasterdata = round($attr["value_0"],1);
  print 'My Data: '.$rasterdata.';
  $shpobj->free();
}
}
 else{
print 'no Data';
 }

Greetings
Sven



- Original Message - 
From: "Andrew Mason" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, May 29, 2008 10:29 AM
Subject: [mapserver-users] Accessing raster cell values



Hello List,

This question may be a general newbie GIS question and not solely  related 
to Mapserver, so apologies if I'm posting to the wrong place.


I am serving a GeoTiff via Mapserver using WMS, and displaying it  using 
OpenLayers, so far so good.
I need to be able to click on a point on the map and display the  value 
held within that particular Raster cell.
Can anyone suggest what mechanism I should use for this? WCS looks  like 
it might be the thing I need, but I'm having difficulty finding  much in 
the way of examples and instructions.
I've followed what examples there are and all I can get Mapserver to 
return using WCS, is a Geotiff with every pixel set to zero.
So I've obviously not got it working correctly, and even if it were  I'm 
not sure how to get the information I need out of the returned  Geotiff 
when my client is OpenLayers.


Can anyone suggest a way to access a raster's values when it is  served by 
Mapserver and viewed using OpenLayers?


Thank you

Andrew Mason
___
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