Richard Greenwood | 22 Jul 15:33 2014
Picon

can't compile TinyOWS

I'm not smart enough to fix the compile error that I'm getting below. Any ideas?

$ make
gcc -o tinyows src/fe/fe_comparison_ops.c src/fe/fe_error.c src/fe/fe_filter.c src/fe/fe_filter_capabilities.c src/fe/fe_function.c src/fe/fe_logical_ops.c src/fe/fe_spatial_ops.c src/mapfile/mapfile.c src/ows/ows_bbox.c src/ows/ows.c src/ows/ows_config.c src/ows/ows_error.c src/ows/ows_geobbox.c src/ows/ows_get_capabilities.c src/ows/ows_layer.c src/ows/ows_metadata.c src/ows/ows_psql.c src/ows/ows_request.c src/ows/ows_srs.c src/ows/ows_storage.c src/ows/ows_version.c src/struct/alist.c src/struct/array.c src/struct/buffer.c src/struct/cgi_request.c src/struct/list.c src/struct/mlist.c src/struct/regexp.c src/wfs/wfs_describe.c src/wfs/wfs_error.c src/wfs/wfs_get_capabilities.c src/wfs/wfs_get_feature.c src/wfs/wfs_request.c src/wfs/wfs_transaction.c src/ows/ows_libxml.c -I/usr/include/libxml2 -lxml2 -lz -lm -ldl -g -O2 -std=c99 -pedantic -Wall -I/usr/pgsql-9.2/include -L/usr/pgsql-9.2/lib -lpq   -lfcgi  -lfl
/usr/bin/ld: cannot find -lfl
collect2: ld returned 1 exit status
make: *** [all] Error 1


Thanks,
Rich

--
Richard W. Greenwood, PLS
www.greenwoodmap.com
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Jacob Mendt | 22 Jul 08:16 2014

Problems with getting geojson running as WFS response

Hey List,

 

i am right now trying to bring get my Mapserver (Version 6.0.0) WFS running with GeoJSON. But I always get back an empty response. I tried several approaches and my WFS runs with a GML response. So maybe somebody could give me hint. Here is my mapfile:

 

MAP

                …

PROJECTION

"init=epsg:4314"

END

EXTENT 5.83333301544189 47.2000007629395 23.0000019073486 56

               

#  OUTPUTFORMAT

#    NAME "geojson"

#    DRIVER "OGR/GEOJSON"

#    MIMETYPE "application/json; subtype=geojson"

#    FORMATOPTION "STORAGE=stream"

#    FORMATOPTION "FORM=SIMPLE"

#  END

 

OUTPUTFORMAT

      NAME "geojson"

      DRIVER "TEMPLATE"

      FORMATOPTION "FILE=/home/test/messtischblatt.js"

      MIMETYPE "application/json; subtype=geojson"

END

 

WEB

    METADATA

                "wfs_srs" "epsg:900913 epsg:4314 EPSG:3857 EPSG:4326 EPSG:3978"

                "wfs_getfeature_formatlist" "geojson"

    END

END # WEB

 

 

 

  # geojson layer

  LAYER

    TEMPLATE "messtischblatt.js"

    STATUS ON

    NAME "test"

    TYPE POLYGON

    EXTENT 649304.652862922 6090078.57976033 2559975.30438738 7538210.86255982

 

    DATA "boundingbox from (SELECT * FROM layer ORDER BY titel, time) as foo using unique id using srid=900913"

    CONNECTIONTYPE postgis

    CONNECTION "dbname=*** user=***  password=*** host=*** "

 

    #DATA "messtischblatt"

    #CONNECTIONTYPE OGR

    #CONNECTION "PG: dbname=*** user=*** password=*** host=***"

 

    PROJECTION

                "init=epsg:900913"

    END

    METADATA

                "wfs_title" "Test WFS"

                "wfs_srs" "EPSG:4326 EPSG:4314 EPSG:900913 "

                "wfs_enable_request" "*"

                "wfs_getfeature_formatlist" "geojson"

    END

  END

 

END # MAP#  Tile Index

 

I test it with a couple of approaches. It tried both Outputformats and both ways of defining a postgis data source. But in any case I get back an empty response. With the template approach I used the following template:

 

[resultset layer=test]

{

                “type”: “FeatureCollection”,

                “features”: [

                               [feature trimlast=”,”]

                               {

                                               “type”: “Feature”,

                                               “id”: “[id]”,

                                               …

                               }

                               [/feature]

                ]

}

[/resultset]

 

I run my mapserver also with DEBUG level 5. I got the following log output:

 

[Mon Jul 21 18:10:21 2014].528584 msFreeMap(): freeing map at 0x19447b0.

[Mon Jul 21 18:10:22 2014].387718 CGI Request 1 on process 4362

[Mon Jul 21 18:10:22 2014].521952 mapserv request processing time (msLoadMap not incl.): 0.134s

 

My test request is:

 

http://localhost/cgi-bin/mtbows?map=./test.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=test&MAXFEATURES=100&srsname=EPSG:900913&bbox=1518929.826549386,6766016.954331277,2693002.5808462612,7384239.639015725&outputformat=geojson

 

Could somebody give me an advice?

 

Kind regards,

 

JM

 

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Ian Walberg | 22 Jul 02:34 2014

Build from source with debug symbols

Folks,

 

I cannot see with the new cmake build how to enable debug symbols, can anyone advise?

 

Specifically we have what could be an issue with php_mapscript and what to debug it.

 

Thanks

 

Ian

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Dery Rochiman | 19 Jul 19:44 2014
Picon

PHP Session to Restrict Direct File Access

hai, i've build web gis application with mapserver + postgis + chameleon. i have my phtml file included in
one of my php file. i try to restrict direct access to that php file, but if i wrote session_start() in my top
of php file, the map that i've included does'nt showing. anybody could help me ? thanks.

--

-- 
Regards, 

Dery Rochiman 
---------------- 
System/Network Engineer 
Affiliates and Information Division 
Marine Geological Institute 
Ministry of Energy and Mineral Resources 
Republic of Indonesia 

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

Dietmar Stolz | 18 Jul 12:50 2014
Picon

no oracle access with ogr

Dear list,

I have a problem with the oracle access via ogr.
Beforehand: with orginfo and shp2img everthing works fine. I get my geometries as well as images. Examples:
orginfo --formats shows -> "OCI" (read/write)
ogrinfo -al oci:usr/pwd <at> gspp:table -geom=SUMMARY
shp2img -m test.map -o output.png -all_debug 5 -e 523600 5549800 581900 5639700 -l strom
With mapserver via getmap request i get the following error:
[Fri Jul 18 10:21:13 2014].50000 msOGRFileOpen(OCI:xxx/xxx <at> GSPP:TAALBF_NETZGEBIET)...
[Fri Jul 18 10:21:13 2014].50000 OGROPen(OCI:xxx/xxx <at> GSPP:TAALBF_NETZGEBIET)
[Fri Jul 18 10:21:13 2014].51000 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `strom'.  File not found or unsupported format.
[Fri Jul 18 10:21:13 2014].55000 msDrawMap(): Image handling error. Failed to draw layer named 'strom'.
My mapfile (partial):
 LAYER
 DEBUG 5
  NAME "strom"
  TYPE POLYGON
  CONNECTIONTYPE OGR
  CONNECTION "OCI::usr/pwd <at> GSPP"
  DATA "TAALBF_NETZGEBIET"
  METADATA
   "ows_title" "xxx"
   "ows_abstract" "xxx"
   "ows_extent"   "523600 5549800 581900 5639700"
  END
  CLASS
   STYLE
    OUTLINECOLOR 0 0 0
    COLOR 255 0 0
    WIDTH 2
   END
  END
 END
I work on Windows Server 2012 Datacenter with Mapserver 6.4.1 and GDAL 1.11.0 (from release-1600-x64-gdal-1-11-mapserver-6-4).
I have also tested older versions. without success.

I set a lot of system variables:
set path=C:\Apps\Oracle.112.x64\bin;
set ORACLE_HOME=C:\Apps\Oracle.112.x64
set GDAL_DRIVER_PATH=D:\webgis\mapserver-6-4-1\bin\gdal\plugins
set GDAL_DATA=D:\Temp\mapserver-6-4-1\bin\gdal-data
set LD_LIBRARY_PATH=C:\Apps\Oracle.112.x64\lib;
set TNS_ADMIN=C:\Apps\Oracle.112.x64\network\ADMIN
set ORACLE_SID=GSPP
set ORACLE_BASE=C:\Apps\Oracle.112.x64

Why the mapserver gives me no bitmap?

Thanks a lot

Dietmar
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Andrea Peri | 17 Jul 21:27 2014
Picon

The command separator in STYLEITEM blocks

Hi,

I try to replicate some example from
this link:
http://www.gdal.org/ogr_feature_style.html

But the separator seem don 't work

I try to reproduce the sample from paragraph 2.1 of the
feature-style-specs on mapserver.

The lake sample:

BRUSH(fc:#0000FF);PEN(c:#000000)

But on mapserver it is reproduce exactly as this other sample:
BRUSH(fc:#0000FF)

So I guess the mapserver seem don't accept the ';' as separator
between commands.

Perhaps MS use another char separator rather than ';' ?

Thx,

--

-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Gertjan van Oosten | 17 Jul 14:07 2014
Picon

WFS GetFeature sometimes returns 'missing' even when there are matching features

Hi,

A WFS GetFeature request like this one:

  <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <wfs:Query typeName="feature:Results_wfs">
      <wfs:PropertyName>FEATURE_ID</wfs:PropertyName>
    </wfs:Query>
  </wfs:GetFeature>

sometimes returns 'missing' like so:

  <?xml version='1.0' encoding="ISO-8859-1" ?>
  <wfs:FeatureCollection
     xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
     xmlns:gml="http://www.opengis.net/gml"
     xmlns:wfs="http://www.opengis.net/wfs"
     xmlns:ogc="http://www.opengis.net/ogc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver
http://localhost/mapserv?SERVICE=WFS&amp;VERSION=1.1.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=feature:Results_wfs&amp;OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1
 http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
     <gml:boundedBy>
	<gml:Null>missing</gml:Null>
     </gml:boundedBy>
  </wfs:FeatureCollection>

even when there is a matching feature. This happens with Mapserver 6.4.1
and Oracle 11.2. I've traced it down to the searchrect in msQueryByRect()
inside mapquery.c being "empty":

  {minx=-1, maxx=-1, miny=-1, maxy=-1}

This is caused by the way the extent is computed:

   msOracleSpatialLayerGetExtent. Using this Sql to retrieve the extent:
   SELECT SDO_GEOM.SDO_CONVEXHULL(link_geo, 0.001000) AS GEOM from (...)

The convex hull is NULL for some features. As the documentation says:

  http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_objgeom.htm#SPATL1114
  "The function returns a null value if geom1 is of point type, has
  fewer than three points or vertices, or consists of multiple points
  all in a straight line."

I indeed have features like that, so in this case no features are
returned at all. That is obviously not right. If I add these three lines
it works correctly and my features are returned:

--- mapserver-6.4.1/mapquery.c.distrib	2014-01-02 13:41:49.000000000 +0100
+++ mapserver-6.4.1/mapquery.c	2014-07-17 13:58:36.000000000 +0200
 <at>  <at>  -1055,30 +1055,33  <at>  <at> 

     searchrect = map->query.rect;
     if(lp->tolerance > 0) {
       layer_tolerance = lp->tolerance;

       if(lp->toleranceunits == MS_PIXELS)
         tolerance = layer_tolerance * msAdjustExtent(&(map->extent), map->width, map->height);
       else
         tolerance = layer_tolerance * (msInchesPerUnit(lp->toleranceunits,0)/msInchesPerUnit(map->units,0));

       searchrect.minx -= tolerance;
       searchrect.maxx += tolerance;
       searchrect.miny -= tolerance;
       searchrect.maxy += tolerance;
     }
+    if (searchrect.minx == -1 && searchrect.maxx == -1 && searchrect.miny == -1 && searchrect.maxy == -1) {
+      searchrect = map->extent;
+    }

     msRectToPolygon(searchrect, &searchshape);

     /* Raster layers are handled specially. */
     if( lp->type == MS_LAYER_RASTER ) {
       if( msRasterQueryByRect( map, lp, searchrect ) == MS_FAILURE)
         return MS_FAILURE;

       continue;
     }

     /* Paging could have been disabled before */
     paging = msLayerGetPaging(lp);
     msLayerClose(lp); /* reset */
     status = msLayerOpen(lp);

I.e if the query rectangle can't be computed for some reason, fall back
to the map extent. I don't know if this is the best fix, but it is the
simplest that I could find. Is this the right way to do it?

Kind regards,
--

-- 
-- Gertjan van Oosten, Principal Consultant, West Consulting B.V.
-- gertjan <at> West.NL     +31 15 2191 600       www.west.nl
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Andrea Peri | 17 Jul 10:49 2014
Picon

STYLEITEM working with ground units.

Hi,

I'm testing the new feature STYLEITEM with the OGRSTYLE option.

I see that the LABEL Are not scaled nevertheless the value in the
style field is:

LABEL(f:"Arial",t:"38.7",s:3g,c:#000000)

the 3g should mean size in 3 ground units.

I see that instead it work if I set the SIZEUNITS to meters it work,
but I'm not sure that is correct that it should work only setting the SIZEUNITS.

Thx,

--

-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Moen, Paul T. | 16 Jul 18:14 2014

How to combine all included map files in to one production map file.

Is there an easy way to combine all included map files into a single map file?  The includes make it easy to organize the map file, but I want to combine all of them into one map file that will be used for debug or production.

The only thing I found related to what I want is specifically listed in the documentation at http://www.mapserver.org/mapfile/include.html, but it has no information on how to build a production map file.

Performance does not seem to be seriously impacted with limited use, however in high performance instances you may want to use includes in a pre-processing step to build a production mapfile.

Thanks,

Paul
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Leehan | 16 Jul 16:35 2014
Picon

itemquery mode with mapserver 6.4.1

Hello,

I m looking for an example of mapserver application using itemquery mode
successfully.
I'd like to study the mapfile and validation part, and the template.
Because i can't set this functionnality for now.
Can anyone help please ? 

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/itemquery-mode-with-mapserver-6-4-1-tp5151332.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

forums | 15 Jul 20:31 2014

Issues with Python Mapscript

Hi Guys:

I'm having issues with the Python implementation of mapscript.  It appears some support is missing.
I'm using mapserver 6.4.1-2 on Arch Linux.
python2 -V 2.7.8
mapscript.MS_VERSION = 6.4.1

1)  Transparency not preserved with m.draw() on a mapObj()
Individual Layer tansparency using m.draw() when inside a style object:
mStyle = ms.styleObject()
mStyle.opacity = 50

If I do:
m.save('tmp.map')
And load the resulting map with the mapserver CGI it works fine, the layer is at whatever transparency I set.
Map file:
...
CLASS
      STYLE
        COLOR 255 255 255
        OPACITY 50
        OUTLINECOLOR 0 0 0
      END # STYLE
END # CLASS
...

2) Setting labelObj().type seems to have no effect.
labelObj.type = ms.MS_TRUETYPE
labelObj.type = ms.MS_BITMAP
labelObj.type = 0
labelObj.type = 1
The resulting map definition file has:
..
TYPE BITMAP
..

3) Setting labelObj().size seems to have no effect.
the mapfile has no 'SIZE' attribute when printed out.  I do end up with a SHADOWSIZE, which I'm guessing is default, or has to do with the BITMAP type that's being forced.

4)  I can't seem to set a pattern.  It looks like mapscript.py includes the functionality, but it's giving an error.  Traceback from when my code hands it off:
...
    mStyle.pattern = "5 5 5 5"
  File "/usr/lib/python2.7/site-packages/mapscript.py", line 535, in <lambda>
    __setattr__ = lambda self, name, value: _swig_setattr(self, styleObj, name, value)
  File "/usr/lib/python2.7/site-packages/mapscript.py", line 51, in _swig_setattr
    return _swig_setattr_nondynamic(self,class_type,name,value,0)
  File "/usr/lib/python2.7/site-packages/mapscript.py", line 44, in _swig_setattr_nondynamic
    if method: return method(self,value)
TypeError: in method 'styleObj_pattern_set', argument 2 of type 'double [MS_MAXPATTERNLENGTH]'
...

Am I doing something wrong, or are these issues with the library/Python implementation?

Thank you.



--
A computer without Windows is like chocolate cake without mustard.
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Gmane