Rahkonen Jukka | 10 Feb 16:12
Picon

Does Mapserver utilise Spatialite spatial index correctly?

Hi,
 
GDAL was made to utilise Spatialite spatial index effectively if it exists with ticket
After this change ogr2ogr with -spat bounding box query is much faster.  However, when testing MS4W 3.0.4beta1 which comes with GDAL 1.9, the rendering speed of Spatialite data with Mapserver is pretty slow. It is evenly slow when zoomed out and zoomed in which makes me believe that the spatial index is perhaps not used.
 
Could it be that Mapserver does not utilise the improved method that was implemented for GDAL 1.9 when it is doing spatial queries from Spatialite?
 
-Jukka Rahkonen-
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Picon
Gravatar

label and opacity

Can we put OPACITY on a LABEL :

 CLASS
    NAME "Région administrative"
    EXPRESSION (([no_reg_admin] in '%RES_CO_REG%' ) AND ('[couleur]' = 'VERT'))
    GROUP "select"
    TEXT "[no_reg_admin]"
    STYLE
        COLOR 51 204 51
        OUTLINECOLOR 139 35 35
        WIDTH 10
    END
    LABEL
        COLOR 212 212 212
        OUTLINECOLOR    250 255 255
        ANTIALIAS       FALSE
        TYPE            TRUETYPE
        FONT            "arialbd"
        SIZE           50
        STYLE
            OPACITY 23
        END
    END
END

and my outputformat is :

OUTPUTFORMAT
    NAME "png"
    MIMETYPE "image/png"
    DRIVER "AGG/PNG"
    EXTENSION "png"
    IMAGEMODE RGBA
    TRANSPARENT ON
    FORMATOPTION          "INTERLACE=OFF"
END

it should work but my label is not transparent
is it a FONT problem ?


_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Carman, Darren | 9 Feb 12:25

Mapserver 5.6 and WMS 1.3.0

Hi,

 

Can I ask whether Mapserver 5.6 is fully WMS 1.3.0 compliant? I see lots of occurrences of OWS_1_3_0 within the code which makes me think it should.

 

I have had to make the following changes in order to get my 1.3 requests going through OK. Could somebody tell me whether or not I should be doing this, i.e. are these separate bits of functionality that shouldn’t support 1.3.0 yet:

 

mapwms.c

=========

Line 92 in function msWMSException, added:

      else if (nVersion <= OWS_1_3_0)

        wms_exception_format = "XML";   /* WMS 1.3.0 */

This was to allow me to get through the exception parameter checking on line 739 of function msWMSLoadGetMapParams (I believe WMS 1.3 has XML as its default exception parameter).

 

mapwmslayer.c

=============

Line 518 in function msBuildWMSLayerURL, added:

      case OWS_1_3_0:

Also changed the error message to say it supports up to 1.3.0 rather than 1.1.1.

 

I am hoping these changes won’t cause me problems later on, but for now they allow me to make 1.3.0 requests.

 

Regards,

Darren

 

 

Infoterra Ltd. Is part of the Astrium GEO-Information Services Division and a wholly owned subsidiary of Astrium, Europe's leading space systems and services specialist.

Disclaimer. The information contained in this e-mail and its attachments are confidential and intended only for the use of the named addressee(s). If you are not the intended addressee, please do not read, copy, use or disclose this message or its attachments. If you have received this message in error, please notify the sender immediately and delete or destroy all copies of this message and attachments in all media. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Infoterra Ltd and shall not form part of any binding agreement.

Infoterra Limited a company registered in England under number 2359955 and having its registered office at Atlas House, 41 Wembley Road, Leicester, LE3 1UT. VAT number GB 476 0468 27.

P Before printing, think about the environment

 

 

 


_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
ElPer | 9 Feb 08:57
Picon

replacing layer with different scales.

Hello

I need help with the mapfile of the mapserver and I hope you can help me.
I want to replace one layer with another at different scale, but I get
always an Error.
In the documentation I read that I can replace it with the same name
according to different scales: 
"The name should be unique, unless one layer replaces another at different
scales."
Our Mapserver uses also Tilecache and I'm not sure if the error comes from
the mapserver or tilecache.

Thanks for your help

Here is my mapfile:

MAP
   NAME Nautical Map
   STATUS ON

   # Spherical Mercator
   EXTENT -20037508.34 -20037508.34 20037508.34 20037508.34
   PROJECTION
      "init=epsg:900913"
   END

   SIZE 2048 2048

   IMAGETYPE mypng
   OUTPUTFORMAT
      NAME "mypng"
      DRIVER AGG/PNG
      MIMETYPE "image/png"
      IMAGEMODE RGBA
      EXTENSION "png"
      TRANSPARENT ON
      FORMATOPTION "INTERLACE=OFF"
   END

   WEB
      IMAGEPATH "/opt/fgs2/tmp/ms_tmp/"
      IMAGEURL "/ms_tmp/"
      METADATA
         "wms_srs" "EPSG:4326 EPSG:900913"
      END
   END

    LAYER
      NAME MIPARE_A_1
      GROUP "MIPARE"
      STATUS ON
      PROJECTION
         "init=epsg:4326"
      END
      TYPE POLYGON
      DATA "data/Scale_S57_Shapefile/25000/DE416020/MIPARE/A/MIPARE.shp"
      PROCESSING "CLOSE_CONNECTION=DEFER"
      PROCESSING "LABEL_NO_CLIP=ON"
      MINSCALEDENOM 0
      MAXSCALEDENOM 24999
      CLASS
         EXPRESSION ([CATMPA] == 2)
         STYLE
            SIZE 10
            OUTLINECOLOR 200 0 255
            SYMBOL mipare_torea
         END
      END
      CLASS
         EXPRESSION (([CATMPA] == 3) || ([CATMPA] == 4))
         STYLE
            SIZE 10
            OUTLINECOLOR 200 0 255
            SYMBOL mipare_subea
         END
      END
      CLASS
         STYLE
            SIZE 1
            OUTLINECOLOR 200 0 255
            SYMBOL dashed_line
         END
      END
   END

   LAYER
      NAME MIPARE_A_1
      GROUP "MIPARE"
      STATUS ON
      PROJECTION
         "init=epsg:4326"
      END
      TYPE POLYGON
      DATA "data/Scale_S57_Shapefile/45000/DE316001/MIPARE/A/MIPARE.shp"
      PROCESSING "CLOSE_CONNECTION=DEFER"
      PROCESSING "LABEL_NO_CLIP=ON"
      MINSCALEDENOM 25000
      MAXSCALEDENOM 499999
      CLASS
         EXPRESSION ([CATMPA] == 2)
         STYLE
            SIZE 10
            OUTLINECOLOR 200 0 255
            SYMBOL mipare_torea
         END
      END
      CLASS
         EXPRESSION (([CATMPA] == 3) || ([CATMPA] == 4))
         STYLE
            SIZE 10
            OUTLINECOLOR 200 0 255
            SYMBOL mipare_subea
         END
      END
      CLASS
         STYLE
            SIZE 1
            OUTLINECOLOR 200 0 255
            SYMBOL dashed_line
         END
      END
   END
END

And here is the Exception wich I get:

Mapserver message:
 Did not get image data back. 
URL:
http://127.0.0.1:8181/cgi-bin/mapserv?MAP=/opt/fgs2/www/htdocs/nautical.map&transparent=true&layers=MIPARE_A_1&styles=&service=WMS&width=612&format=image%2Fpng&request=GetMap&height=612&srs=EPSG%3A900913&version=1.1.1&bbox=1104629.71327%2C7248943.79384%2C1116324.57859%2C7260638.65917
Content-Type Header: application/vnd.ogc.se_xml
Response: 
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM
&quot;http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd&quot;>
<ServiceExceptionReport version="1.1.1">
<ServiceException code="LayerNotDefined">
msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in the
LAYERS parameter.
</ServiceException>
</ServiceExceptionReport>

  File "/opt/fgs2/www/htdocs/tilecache-2.10/TileCache/Service.py", line 323,
in cgiHandler
    format, image = service.dispatchRequest( params, path_info, req_method,
host )
  File "/opt/fgs2/www/htdocs/tilecache-2.10/TileCache/Service.py", line 226,
in dispatchRequest
    (format, data) = self.renderTile(t, params.has_key('FORCE'))
  File "/opt/fgs2/www/htdocs/tilecache-2.10/TileCache/Service.py", line 138,
in renderTile
    data = layer.render(tile, force=force)
  File "/opt/fgs2/www/htdocs/tilecache-2.10/TileCache/Layer.py", line 435,
in render
    image = self.renderMetaTile(metatile, tile)
  File "/opt/fgs2/www/htdocs/tilecache-2.10/TileCache/Layer.py", line 395,
in renderMetaTile
    data = self.renderTile(metatile)
  File "/opt/fgs2/www/htdocs/tilecache-2.10/TileCache/Layers/WMS.py", line
29, in renderTile
    tile.data, response = wms.fetch()
  File "/opt/fgs2/www/htdocs/tilecache-2.10/TileCache/Client.py", line 68,
in fetch
    raise Exception("Did not get image data back. \nURL: %s\nContent-Type
Header: %s\nResponse: \n%s" % (self.url(), ctype, data))

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/replacing-layer-with-different-scales-tp4378365p4378365.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

John Cartwright | 9 Feb 06:05
Picon

speed up WCS access to large GeoTIFF

Hello All,

I have a WCS service on a large GeoTIFF image.  Are there any strategies for speeding up the GetCoverage request?

Thanks!

--john

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

Olivier Courtin | 8 Feb 23:52
Picon
Gravatar

[ANN] TinyOWS 1.0.0 release

Hi alls,

TinyOWS 1.0.0 official release is (finally) out !

You could download it from:
<http://tinyows.org/tracdocs/release/tinyows-1.0.0.tar.bz2>
(checksum 25c9567848b97a3ad9a111c0053e4248)

ChangeLog:
 - Configuration change with broken backward compatibility:
    * default config file is now /etc/tinyows.xml
    * default schema dir is now $PREFIX/share/tinyows/schema
    * rename server and prefix to ns_uri ans ns_prefix
    * rename wfs_display_bbox to display_bbox
 - Encoding support, written by Carlos Ruiz: cruizch <at> gmail.com
 - Estimated_bbox option for GetCapabilities response (default is false)
 - Schema cache for fast-cgi mode (huge performance improvement on transaction operations)
 - Improve drasticaly GetCapabilities performance on huge layer (Thanks to Nicklas Aven for report)
 - Add ability to use different names for layer and storage table (table property)
 - Mapfile config file support (use related TINYOWS_MAPFILE env. var)
 - Debug option available from configure step (--enable-debug)
 - Improve result from --check option
 - Add wfs_default_version config file option, to set server default WFS Version
 - Add gml_ns config file option, to set if any, layers properties using GML namespace
 - Add log_level config file option, to allow more granularity in log output
 - PostGIS version init check (support 1.5 and coming 2.0)
 - Update XSD schema (WFS, FE, GML), so need a new 'make install' step if you upgrade
 - CITE WFS-T 1.0.0 SF-0 full compliant (require PostGIS 2.0)
 - CITE WFS-T 1.1.0 SF-0 full compliant (require PostGIS 2.0)
 - Lot of debug stuff (a special thanks to Boris Leukert, Jukka Rahkonen and Even Rouault for detailled reports)
 - Security fixes (SQL Injection vulnerability - Reported by Even Rouault)

Thanks again to all folks who contributed on it !

--
Olivier

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Daniel Morissette | 8 Feb 22:12

Release of MapServer 6.0.2 and 5.6.8

The MapServer team announces the release of MapServer versions 6.0.2 and 
5.6.8.

No new functionality has been added. 6.0.2 is a maintenance release that 
fixes a few issues found since 6.0.1 including a recently discovered 
security vulnerability in the handling of WFS filters inside a SLD. The 
list of fixes since 6.0.1 is included at the end of this message.

Versions 5.6.8 includes fixes for the same WFS Filter security 
vulnerability plus a few bug fixes that were backported since the last 
official release. See the 5.6.8 HISTORY.TXT file for additional information.

Source and binary downloads:
----------------------------

The source code is available at:

     http://mapserver.org/download.html

The binary distributions listed in the download page should be updated 
shortly with binaries for the new 6.0.2 release (and in some cases 5.6.8).

The MapServer Team

Version 6.0.2 (2012-02-08):
---------------------------

- Fix security issue with quote escape in WFS GetFeature Filter (#4087)

- Fixed lexer buffer size issue with single quotes in a string  (#4175)

- Raster layer fails to be drawn if the window is less than half a pixel 
(#4172)

- Fixed SLD with FILTER doesn't apply properly to database layers (#4112)

- Fixed a problem with calls to labelInImage() (maplabel.c) when label 
gutter
   and label buffers are both used (#3303). Also changed the usage 
around that
   function to make it easier to understand. At a result the
   "labelcache_map_edge_buffer" processing option (i.e. gutter) can be 
provided
   as a positive or negative value. (closes #1355 too)

- Added label->style markers to collision detection (#4133)

- Fixed single pixel coverages in WCS 2.0 (#4110)

- Fixed subsetting in WCS 2.0 (#4099)

- Fixed segfault when calling classObj::updateFromString() with SYMBOL 
(#4062)

- fix rendering offset on thick GD lines (#3962)

- fix segfault on join with postgresql tables (#4074)

- Fixed Python Mapscript does not write COLOR to reference map (#4042)

- Fixed cannot add a style to a label in PHP/SWIG Mapscript (#4038)

- Add missing outputFormat support in WFS GetFeature POST XML requests 
(#4052)

- Fixed schema validity issue for WCS 1.1 GetCoverage responses (#4047)

- fix centroid geomtransform parser (#4029)

- PHP MapScript is missing many styleObj properties (#3901)

- Added GEOMTRANSFORM in writeStyle function

- WCS 1.0: Fix crash with some _rangeset_axes values (#4020)

- Changed msDrawVectorLayer() not to cache shapes if attribute binding is
   present after the first style (#3976)

- Fix mapscript to build when TRUE macro is not defined (#3926)

- Fix mapscript php build issues with MSVC (#4004)

- PHP/Mapscript: Segmentation fault when getting complex object using
   PHP 5.2 (#3930)

- Fixed contains operator in logical expresions (#3974)

- Fix incorrect rendering of GD lines between 1 and 2 pixels wide (#3962)

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

Mark Volz | 8 Feb 21:17
Picon
Picon

using pattern or nullformat in templates - Mapserver 5.4

Hello,
 
I am trying to display an address as part of my identify parcel template.  The template works fine for parcels that have a valid address.  However, for parcels that do not have an address a “0” is displayed (the zip field is a integer).  How can I change the results so that either nothing, or a message such as “no site address” is displayed?
 
 
When I try to use pattern:
 
  • [item name="PHYZIP" pattern=/^[1-9]/]   - displays the address if there is one, or “1/]” is there is not an address.
  • [item name="PHYZIP" pattern=”/^[1-9]/”]  - crashes
 
Nullformat appears to only work with strings that are null, not integers that are 0.  Is there a way to set a nullvalue, for example:
  • [item name=”PHYZIP” nullformat=”No Physical Address” nullvalue=”0”]
 
Thanks
 
 
 
 
Mark Volz
GIS Specialist
 
 
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Ebrahim Poorazizi | 7 Feb 22:56
Picon
Gravatar

MapServer SOS Configuration

Hi, 

I tried to set up MapServer SOS but I faced a problem: the SOS doesn't return anything. You may see the map file I have created below: 


    MAP  
      NAME "SOS_DEMO"   
      STATUS ON   
      SIZE 400 300   
      EXTENT -180 -90 180 90   
      UNITS METERS   
      SHAPEPATH "C:\ms4w\apps\tutorial\data"   
      IMAGECOLOR 255 255 255   
    
      WEB   
        IMAGEPATH "C:\ms4w\apps\tutorial\templates"   
        IMAGEURL "C:\ms4w\apps\tutorial\images"   
        METADATA   
          "sos_onlineresource" "http://127.0.0.1:8282/cgi-bin/mapserv.exe?map=c:/ms4w/mysos.map?"   
          "sos_title"          "My SOS Demo Server"   
          "sos_srs"            "EPSG:4326"   
          "sos_enable_request" "*"   
        END   
      END   

      PROJECTION   
        "init=epsg:4326"   
      END   

      LAYER   
        NAME "sos_point"   
        METADATA   
          "sos_procedure"  "ifgi-sensor-1"   
          "sos_offering_id" "WQ1289"   
          "sos_observedproperty_id" "Water Quality"   
          "sos_describesensor_url" "http://127.0.0.1:8181/DescribeSensor.xml"   
        END   
    
        TYPE POINT   
        STATUS ON   
        DATA 'sospoint'   
        PROJECTION   
          "init=epsg:4326"   
        END   
        CLASS   
          NAME 'sospoint'   
          STYLE   
            COLOR 255 128 128   
          END   
        END   
      END    
    END   


As you see, I tried to retrieve sensor data from a shapefile. The message returned by the SOS is: 

<om:member>
<om:Observation>
<om:procedure xlink:href="urn:ogc:def:procedure:ifgi-sensor-1"/>
<om:observedProperty>
<swe:CompositePhenomenon gml:id="Water Quality" dimension="3">
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:Id"/>
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:sensor_nam"/>
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:sensor_val"/>
</swe:CompositePhenomenon>
</om:observedProperty>
<om:resultDefinition>
<swe:DataBlockDefinition>
<swe:components>
<swe:DataRecord/>
</swe:components>
<swe:encoding>
<swe:TextBlock tokenSeparator="," blockSeparator=" " decimalSeparator="."/>
</swe:encoding>
</swe:DataBlockDefinition>
</om:resultDefinition>
<om:result></om:result>
</om:Observation>
</om:member>
</om:ObservationCollection>


Although I put 6 observations into the shapefile but the SOS doesn't return any. Would you please let me know what I should do to resolve the problem?! 

Regards,
Ebrahim
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Bistrais, Bob | 7 Feb 19:28
Favicon

Problem with mapfile path in MS 6.0.1

I’m trying to migrate an application from 5.6 to 6.0.1.  The basic HTML loads correctly, but it is having trouble finding the path to the mapfile.  Here are two lines of code specifying the map path and file:

 

$_SESSION['map_path']="/ms4w_303/apps/mgs/maps/";

$_SESSION['map_file']="ipmapp1_local_enhanced.map";

 

And when I try to load the app, here is the error:

 

Warning: mapObj::__construct(): [MapServer Error]: msProcessProjection(): No such file or directory in C:\ms4w_303\apps\mgs\htdocs\drawMap.php on line 219 Fatal error: Uncaught exception 'MapScriptException' with message 'Failed to open map file /ms4w_303/apps/mgs/maps/ipmapp1_local_enhanced.map' in C:\ms4w_303\apps\mgs\htdocs\drawMap.php:219 Stack trace: #0 C:\ms4w_303\apps\mgs\htdocs\drawMap.php(219): mapObj->__construct('/ms4w_303/apps/...') #1 {main} thrown in C:\ms4w_303\apps\mgs\htdocs\drawMap.php on line 219

 

I triple-checked the path and I know this to be correct.  The application had the same file and path structure in 5.6.  I’m checking permissions but as far as I can tell these are OK. 

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
John Taranu | 7 Feb 17:55
Gravatar

MapCache: returning blank tiles when outside restricted extents?

We're having some problems with MapCache with a fully-seeded cache covering
a small geographic extent.  

If the tileset definition doesn't have a restricted_extent, then any
requests outside the cache extents are supposed to return blank tiles, and
those blank tiles are being saved to the cache directory structure as
symlinks.  I want to avoid that, for two reasons:
   1. There will be lots of requests outside the cache extent, and I want to
avoid creating hundreds of thousands of symlinks (and empty directories)
   2. The cache was originally seeded as user "root", but the MapCache web
service runs as another user (either "apache" or the nginx user), and that
user cannot write to the cache directory.  

If instead I set the grid (inside the tileset definition) to have a
restricted_extent,  then any requests outside the cache extents throw an
error.  

Is there some way force MapCache to return a blank tile for requests outside
the restricted_extent, without saving that tile into the cache?

---------------------------------------
John Taranu
Senior Web Developer
First Base Solutions Inc
email: jtaranu <at> firstbasesolutions.com
web: firstbasesolutions.com

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


Gmane