Re: [mapserver-users] How to use/offer multiple projections in mapfile for WMS

2014-01-22 Thread Rahkonen Jukka (Tike)
Hi,
 
You must use the projection block also in each layer. You seem to tried that so 
take the comments out from there.  
Without telling in which projection the layer source data is Mapserver can't 
project it to other systems.

By a quick look your mapfile should work. An empty map may mean that the BBOX 
of your requests hits an area with no data. That happens easily when changing 
from EPSG:4326 into projected systems without changing BBOX to suit the other 
projection.  Check if you happen to use still BBOX -180 -90 180 90. In 
EPSG:3395 the whole World needs a biggeg box of
-20037508.3428, -15496570.7397, 20037508.3428, 18764656.2314

-Jukka Rahkonen-




 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Puolesta Stefan Schwarzer
 Lähetetty: 22. tammikuuta 2014 8:58
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] How to use/offer multiple projections in mapfile for
 WMS
 
 Hi there,
 
 I'd like to offer multiple projections for my WMS layers. But it doesn't work 
 the
 way I want.
 
 The EPSG:4326 works well. But when I change it to, for example, EPSG: 3395, I
 get an empty image (the legend shows).
 
 I have to define the projection at various places - already a bit confusing 
 for me.
 And I have a projection in the SQL query: .. USING srid= 4326. Tried to 
 replace
 that one too, but didn't change anything.
 
 Thanks for any suggestions!
 
 Stefan
 
 
 MAP
 
 # Map definition -
 
 NAME wms_test.map
 STATUS ON
 SIZE 600 300
 EXTENT -180 -90 180 90
 UNITS DD
 IMAGECOLOR 255 255 255
 SHAPEPATH 'xx'
 FONTSET 'xx'
 SYMBOLSET 'xx'
 IMAGETYPE png
 DATAPATTERN '^[0-9]'
 
 
 PROJECTION
 'init=epsg:4326'
 END
 
 
 
 WEB
 IMAGEPATH '/www/geodataportal/temp/'
 IMAGEURL 'http://129.194.231.185/temp/'
 METADATA
 'wms_title' 'Environmental 
 Data Explorer WMS Server'
 'wms_service_onlineresource'
 'http://129.194.231.185/cgi-
 bin.main?map=/www/geodataportal/htdocs/mod_map/wms_test.map'
 'wms_getfeatureinfo'
 'http://129.194.231.185/cgi-
 bin.main?map=/www/geodataportal/htdocs/mod_map/wms_test.map'
 'wms_featureinfoformat' 'text/plain'
 'wms_abstract'  '...'
 'wms_accessconstraints' '...'
 'wms_country'   'Switzerland'
 'wms_city'  'Geneva'
 'wms_postcode'  '1211'
 'wms_address'   '11, Chemin des 
 Anémones'
 'wms_contactperson' '-'
 'wms_addresstype'   '-'
 'wms_stateorprovince'   'Geneva'
 'wms_contactelectronicmaliaddress' 'geo_team ---at--- 
 grid.unep.ch'
 'wms_contactorganization'   
 'UNEP/DEWA/GRID-Europe'
 'wms_keywordlist'   'download, 
 environment, geo, data,
 water, map, graph, world, population, unep, emission, temperature,
 biodiversity, forest, consumption, vegetation, land, statistics, energy, soil'
 'ows_enable_request''*'
 'wms_srs'   'EPSG:4326 EPSG:3395'
 'ows_srs'   'EPSG:4326 EPSG:3395'
 END
 END
 
 
 
 
 LAYER
 NAME agri_area
 METADATA
 'wms_title' 'Agricultural Area'
 'wms_abstract'   'Units: Square Kilometers'
 'wms_timeextent''2011'
 'wms_extent''-180 -90 180 90'
 'wms_srs'   'EPSG:4326 EPSG:3395'
 'wms_include_items' 'name,value'
 END # METADATA
 #PROJECTION
 #'init=epsg:4326'
 #END
 STATUS OFF
 CONNECTIONTYPE postgis
 CONNECTION 'user=xx password=xx dbname=xx'
 TYPE POLYGON
 DATA geom FROM (query-here) AS foo USING UNIQUE uid USING srid=
 4326
 TEMPLATE 'dummy'
 DUMP TRUE
 CLASSITEM 'value'
 CLASS
 NAME 'Agricultural Area [2011]'
 EXPRESSION ([value]=-10001)
 TEMPLATE 'empty space'
 END  # CLASS
 CLASS
 NAME 'Square Kilometers'
 EXPRESSION ([value]=-110003)
 TEMPLATE 

Re: [mapserver-users] Problem using WMS GetFeatureInfo in OpenLayers with different projections

2014-01-22 Thread Dejan Gambin
Sorry for being late...

So, I have tested it all with browser of course. Here are some working and 
non-working requests:

Mapfile part:

  PROJECTION
init=epsg:4326
  END  
  METADATA
wms_srs   EPSG:4326
wms_title  aster_dem
gml_include_items value_0
gml_value_0_alias Nadmorska_visina
  END
  TILEINDEX ../aster/aster_index  #original raster in 4326


Working GetMap request in 900913:

http://mydomain.com/cgi-bin/mywms/?SERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=aster_dem_infoSTYLES=SRS=EPSG:900913FORMAT=image/pngWIDTH=400HEIGHT=300BBOX=1496080.301904,5576310.226428,1593919.698096,5649689.773572

Non-working GetFeatureInfo request in 900913:

http://mydomain.com/cgi-bin/mywms/?SERVICE=WMSVERSION=1.1.1REQUEST=GetFeatureInfoLAYERS=aster_dem_infoSTYLES=SRS=EPSG:900913FORMAT=image/pngWIDTH=400HEIGHT=300BBOX=1496080.301904,5576310.226428,1593919.698096,5649689.773572QUERY_LAYERS=aster_dem_infoINFO_FORMAT=gmlX=200Y=100

Working GetMap request in 4326:

http://mydomain.com/cgi-bin/mywms/?SERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=aster_dem_infoSTYLES=SRS=EPSG:4326FORMAT=image/pngWIDTH=400HEIGHT=300BBOX=13.439518,44.712096,14.318424,45.178647

Working GetFeatureInfo request in 4326:

http://mydomain.com/cgi-bin/mywms/?SERVICE=WMSVERSION=1.1.1REQUEST=GetFeatureInfoLAYERS=aster_dem_infoSTYLES=SRS=EPSG:4326FORMAT=image/pngWIDTH=400HEIGHT=300BBOX=13.439518,44.712096,14.318424,45.178647QUERY_LAYERS=aster_dem_infoINFO_FORMAT=gmlX=200Y=100






On 17. sij. 2014., at 13:52, Rahkonen Jukka (Tike) wrote:

 Hi,
 
 Please show us the complete GetFeatureInfo requests for both cases. Server 
 urls are not interesting but all the WMS parameters. Have you already tried 
 to send them from browser? Testing with OpenLayers is waste of time because 
 you can't control what really happens but with hand written requests you are 
 the master.
 
 -Jukka Rahkonen-
 
 
 Lars Lingner wrote:
 
 On 17.01.2014 11:10, Dejan Gambin wrote:
 What is the mywms? MapServer binary, wrapper script, ...?
 wrapper script. Something like:
 
 #! /bin/sh MS_MAPFILE=/path_to_my_map_file export MS_MAPFILE
 /usr/lib/cgi-bin/mapserv6
 
 
 AFAIK nothing wrong here.
 
 
 Did you check the actual requests? Does the bbox parameter fit to
 the srs? Could you compare a working GetFeatureInfo request in
 900913 with a failing one in 4326?
 Yes, bbox parameter fits to srs in both cases. So, if I put bbox/srs
 params in 426 everything works, if I put them in 900913 then error
 happens
 
 Does other maps work with 900913?
 
 I would check which pro4 epsg file mapserver is using, check if there is
 a definition for 90013 and if it looks like
 
 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0
 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs
 
 On the other hand, if GetMap ist working fine, projection definition
 should be fine too. Just thinking out loud...
 
 
 
 Raise the debug level to 3 at map level and layer level. You can
 let MapServer write its own error logfile, so your apache log stays
 clean.
 
 Could you find anything in the MapServer log file?
 
 Here I would identify a working 4326 GFI request and compare the
 corresponding log with a 900913 request. There should be a difference.
 
 
 Best wishes,
 
 Lars
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users

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


[mapserver-users] Python mapscript install v 6.4 -- No module named mapscript

2014-01-22 Thread kaipi
Hi,

I can not get Python mapscript properly installed since Mapserver 6.4
I am compiling Mapserver on Ubuntu 12.04 64Bit:

cmake .. -DWITH_KML=1 -DWITH_GD=1 -DWITH_SVGCAIRO=0 -DWITH_RSVG=1
-DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_CURL=1 -DWITH_PYTHON=1
-DWITH_PHP=1

-- /usr/lib/cgi-bin/mapserv -v
/MapServer version 6.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML
SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO
SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS
INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
/
Seams to work properly. When I try to fetch maptiles via Tilecache (using
Python mapscript) I get the error message /No module named mapscript/.

I guess I don't have Python mapscript properly installed. The ReadME-File in
Python/Mapscript folder recommends to do 
python setup.py build
python setup.py install
but this does not work in 6.4 (it did in 6.2) -- /IOError: [Errno 2] No
such file or directory: '../../mapscriptvars'. Has MapServer been made/?

So what to do ?

Thanks,
Harry 





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Python-mapscript-install-v-6-4-No-module-named-mapscript-tp5099406.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-22 Thread Eichner, Andreas - SID-NLKM
 failed to aquire connection to bdb backend: unknown error
 
 How can I fix or connect to the Berkeley DB?. I'm using Ubuntu Server
 12.05 and Berkeley 5.1 (libdb5.1)

Have you checked the file permissions to allow access to the user the web 
server runs under? 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Python mapscript install v 6.4 -- No module named mapscript

2014-01-22 Thread kaipi
Thanks Thomas,

I forgot the make install step:

mkdir build
cd build
cmake .. -DWITH_KML=1 -DWITH_GD=1 -DWITH_SVGCAIRO=0 -DWITH_RSVG=1
-DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_CURL=1 -DWITH_PYTHON=1
-DWITH_PHP=1
## fix dependency issues
make
make install


Harry



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Python-mapscript-install-v-6-4-No-module-named-mapscript-tp5099406p5099421.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-22 Thread samuelm...@gmail.com
Thanks Andreas for your response. I changed all the permissions to read,
write and the owner, after restarting apache, it fails displaying tiles in
the demo and report the same error:

failed to aquire connection to bdb backend: unknown error

I followed the instructions to check the database created with db_sql
according to [1] but I get the same error:

 db5.1_sql ortofoto.db

ortoforo.db: multiple databases specified but not supported by file
Error: file is encrypted or is not a database

I have little knowledge of this type of database, but I would to evaluate
the loading speed of tiles.

Regards,

Samuel Mesa.

  [1] https://github.com/mapserver/mapcache/issues/58



2014/1/22 Eichner, Andreas - SID-NLKM andreas.eich...@sid.sachsen.de

  failed to aquire connection to bdb backend: unknown error
 
  How can I fix or connect to the Berkeley DB?. I'm using Ubuntu Server
  12.05 and Berkeley 5.1 (libdb5.1)

 Have you checked the file permissions to allow access to the user the web
 server runs under?




-- 
---
.~.
   / v \
  //\\
 /(  )\
   ^`~'^
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] How to throttle msProjectPoint() errors?

2014-01-22 Thread Rahkonen Jukka (Tike)
Hi,

I get quite a lot of errors into the error log probably because WMS users send 
requests which are partly or totally outside the area that is valid for the 
projection. From what I see the service is still usable. It would be OK to get 
one message line into the errorlog for each request but now I get for example 
338 lines from the very same second all with this information:
[Wed Jan 22 16:54:27 2014].434143 msProjectPoint(): Projection library error. 
proj says: latitude or longitude exceeded limits

Is there any way to throttle these messages?

-Jukka Rahkonen-

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


Re: [mapserver-users] How to throttle msProjectPoint() errors?

2014-01-22 Thread Thomas Bonfort
Jukka,
please open an issue for this, I'll try to address it for 7.0

--
thomas

On 22/01/2014 16:35, Rahkonen Jukka (Tike) wrote:
 Hi,
 
 I get quite a lot of errors into the error log probably because WMS users 
 send requests which are partly or totally outside the area that is valid for 
 the projection. From what I see the service is still usable. It would be OK 
 to get one message line into the errorlog for each request but now I get for 
 example 338 lines from the very same second all with this information:
 [Wed Jan 22 16:54:27 2014].434143 msProjectPoint(): Projection library error. 
 proj says: latitude or longitude exceeded limits
 
 Is there any way to throttle these messages?
 
 -Jukka Rahkonen-
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapserver WMS time support with Oracle

2014-01-22 Thread Stefan Schantz
Hi,
we had the same issue.
When we call mapserver via cgi, we set the apache environment for oracle like
this:
SetEnv NLS_LANG=German_Germany.UTF8
SetEnv NLS_DATE_FORMAT=-MM-DD HH24:MI:SS

So, we can use a MapServer supported time format.

When we call mapserver via fastcgi, we set the environment for oracle in a
script:


#!/bin/sh
export ORACLE_HOME=(...)/instantclient_11_2
export ORACLE_BASE=(...)/instantclient_11_2
export LD_LIBRARY_PATH=(...)/instantclient_11_2
export TNS_ADMIN=(...)/instantclient_11_2
export NLS_LANG=German_Germany.UTF8
export NLS_DATE_FORMAT=-MM-DD HH24:MI:SS
MAPSERV=(...)/mapserv.fcgi
MS_MAPFILE=(...)/wms_geoportal.map exec ${MAPSERV}

regards,
Stefan

 D. Nappo domenico.na...@gmail.com hat am 21. Januar 2014 um 15:18
 geschrieben:
 
  ...but unfortunately MapServer wms time support doesn't include that format:
   http://mapserver.org/it/ogc/wms_time.html
 
 
  2014/1/21 D. Nappo domenico.na...@gmail.com
 mailto:domenico.na...@gmail.com 
 Many thanks!
 It helped: the default date format in our system is DD-Mon-RR and I found
  it out with SELECT * FROM nls_database_parameters WHERE parameter LIKE
  '%DATE%'
  
  
  
 2014/1/20 Umberto Nicoletti umberto.nicole...@gmail.com
  mailto:umberto.nicole...@gmail.com 
   On Mon, Jan 20, 2014 at 2:44 PM, D. Nappo
  domenico.na...@gmail.com mailto:domenico.na...@gmail.com 
  wrote:
 Hi there,

   I couldn't figure out how to solve this. I have a layer so
configured:

   LAYER
 NAME layer
 TYPE point
 CONNECTION conn_string
 CONNECTIONTYPE ORACLESPATIAL
 TEMPLATE templates/hotspot_template.html
 DATA SHAPE FROM (SELECT POINT as SHAPE, ACQ_DATE,
ACQ_TIME, SATELLITE, CONFIDENCE, VERSION, BRIGHT_T31, FRP FROM
gwsprd.HOT_SPOTS_MODIS) using unique OGR_FID
 METADATA
   wms_title WMS test
   wms_srs   EPSG:4326
   wms_extent-180 -90 180 90
   wms_timeextent 2000-01-01/2020-12-31
   wms_timeitem acq_date
   wms_timedefault 2014-01-01
   wms_timeformat -MM-DD

   
Try with this:
   
wms_timeformat DD-MM-YY
   
it is the default format Oracle expects when converting a string to a
   date and no format has been explicitly provided.
   
Hth,
Umberto
   
   
 wms_enable_request *
   END
   CLASS
   SYMBOL 'circle'
   SIZE 2
   COLOR255 0 0
   END
   END



   Now, the date column in the oracle table is the acq_date field.


   The problem is that Mapserver translates that with a wrong oracle
query (which it works in postgreslq, I guess):

   SELECT OGR_FID,rownum, SHAPE FROM
   (SELECT OGR_FID, POINT as SHAPE,  ACQ_DATE, ACQ_TIME, SATELLITE,
CONFIDENCE, VERSION, BRIGHT_T31, FRP FROM gwsprd.HOT_SPOTS_MODIS)
   WHERE  acq_date = '2014-01-16'


   The query above uses a wrong filter and it gives the error:

   ORA-01861: literal does not match format string


   How can I tell to Mapserver to use a correct query??? Or do I
missing anyhting???
   Something like:

   WHERE acq_date = to_date('2014-01-16','-MM-DD')
   ___
   mapserver-users mailing list
   mapserver-users@lists.osgeo.org
mailto:mapserver-users@lists.osgeo.org
   http://lists.osgeo.org/mailman/listinfo/mapserver-users
   

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

Re: [mapserver-users] Mapserver WMS time support with Oracle

2014-01-22 Thread Stefan Schantz
Hi,
we did it and it worked, but oracle couldn't use the index of the date column.
You would have to create an index of the to_char(date column)-column.
Stefan


 Rahkonen Jukka  (Tike) jukka.rahko...@mmmtike.fi hat am 21. Januar 2014 um
 15:25 geschrieben:
 
 
  Hi,
 
 
 
  Perhaps you can select the time into a format that Mapserver likes in your
 DATA by using
 to_char?http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions180.htm
 
 
 
  -Jukka Rahkonen-
 
 
 
 
 
  D. Nappo wrote
 
 
 
  ...but unfortunately MapServer wms time support doesn't include that format:
 
   http://mapserver.org/it/ogc/wms_time.html
 
 
 
  2014/1/21 D. Nappo domenico.na...@gmail.com
 mailto:domenico.na...@gmail.com 
 
  Many thanks!
 
  It helped: the default date format in our system is DD-Mon-RR and I found it
 out with SELECT * FROM nls_database_parameters WHERE parameter LIKE '%DATE%'
 
 
 
 
 
  2014/1/20 Umberto Nicoletti umberto.nicole...@gmail.com
 mailto:umberto.nicole...@gmail.com 
 
  On Mon, Jan 20, 2014 at 2:44 PM, D. Nappo domenico.na...@gmail.com
 mailto:domenico.na...@gmail.com  wrote:
 
  Hi there,
 
 
 
  I couldn't figure out how to solve this. I have a layer so configured:
 
 
 
  LAYER
 
NAME layer
 
TYPE point
 
CONNECTION conn_string
 
CONNECTIONTYPE ORACLESPATIAL
 
TEMPLATE templates/hotspot_template.html
 
DATA SHAPE FROM (SELECT POINT as SHAPE, ACQ_DATE, ACQ_TIME, SATELLITE,
 CONFIDENCE, VERSION, BRIGHT_T31, FRP FROM gwsprd.HOT_SPOTS_MODIS) using unique
 OGR_FID
 
METADATA
 
  wms_title WMS test
 
  wms_srs   EPSG:4326
 
  wms_extent-180 -90 180 90
 
  wms_timeextent 2000-01-01/2020-12-31
 
  wms_timeitem acq_date
 
  wms_timedefault 2014-01-01
 
  wms_timeformat -MM-DD
 
 
 
 
 
  Try with this:
 
 
 
  wms_timeformat DD-MM-YY
 
 
 
  it is the default format Oracle expects when converting a string to a date
 and no format has been explicitly provided.
 
 
 
  Hth,
 
  Umberto
 
 
 
 
 
 
wms_enable_request *
  
END
  
CLASS
  
SYMBOL 'circle'
  
SIZE 2
  
COLOR255 0 0
  
END
  
END
  
  
  
  
  
  
  
Now, the date column in the oracle table is the acq_date field.
  
  
  
  
  
The problem is that Mapserver translates that with a wrong oracle query
  (which it works in postgreslq, I guess):
  
  
  
SELECT OGR_FID,rownum, SHAPE FROM
  
(SELECT OGR_FID, POINT as SHAPE,  ACQ_DATE, ACQ_TIME, SATELLITE,
  CONFIDENCE, VERSION, BRIGHT_T31, FRP FROM gwsprd.HOT_SPOTS_MODIS)
  
WHERE  acq_date = '2014-01-16'
  
  
  
  
  
The query above uses a wrong filter and it gives the error:
  
  
  
ORA-01861: literal does not match format string
  
  
  
  
  
How can I tell to Mapserver to use a correct query??? Or do I missing
  anyhting???
  
Something like:
  
  
  
WHERE acq_date = to_date('2014-01-16','-MM-DD')
  
  
  
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org mailto: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] TinyOWS insert feature not working

2014-01-22 Thread Jiří Kadlec
I have installed and set-up TinyOWS for editing features from PostGIS
database on a RHEL6 Linux server.
Displaying features is working OK in QGIS and in Openlayers.
Editing a feature also works correctly.
However, when I try to insert a new feature I get the following error
response:

?xml version='1.0' encoding='UTF-8'?
ows:ExceptionReport
 xmlns='http://www.opengis.net/ows'
 xmlns:ows='http://www.opengis.net/ows'
 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
 xsi:schemaLocation='http://www.opengis.net/ows
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd'
 version='1.1.0' language='en'
 ows:Exception exceptionCode='InvalidParameterValue' locator='request'
  ows:ExceptionTextXML request isn't valid/ows:ExceptionText
 /ows:Exception
/ows:ExceptionReport

Here is the Request payload that gets posted to TinyOWS:

   1. wfs:Transaction xmlns:wfs=http://www.opengis.net/wfs; service=WFS
   version=1.0.0 xsi:schemaLocation=http://www.opengis.net/wfs
   http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd; xmlns:xsi=
   
http://www.w3.org/2001/XMLSchema-instance;wfs:Insertfeature:mk_city_centre
   
xmlns:feature=https://geoinformatics.aalto.fi/;feature:the_geom3857gml:MultiPolygon
   xmlns:gml=http://www.opengis.net/gml;
   
srsName=EPSG:3857gml:polygonMembergml:Polygongml:outerBoundaryIsgml:LinearRinggml:coordinates
   decimal=. cs=, ts= 2852436.2002366,8629373.6312116
   2851633.6114397,8628494.6053864 2850678.1485863,8629067.8830985
   2850563.4930439,8630176.2200085
   
2852436.2002366,8629373.6312116/gml:coordinates/gml:LinearRing/gml:outerBoundaryIs/gml:Polygon/gml:polygonMember/gml:MultiPolygon/feature:the_geom3857/feature:mk_city_centre/wfs:Insert/wfs:Transaction




-- 
My TinyOWS error log shows:


   1.
   2. [Thu Jan 23 04:45:19 2014] [ERROR] Element '{
   http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at
   location '
   
https://geoinformatics.aalto.fi/kala/tinyows.cgi?service=WFSrequest=DescribeFeatureTypeversion=1.0.0'.
   Skipping the import.
   3.
   4. [Thu Jan 23 04:45:19 2014] [ERROR] Element '{
   https://geoinformatics.aalto.fi/}mk_city_centre': This element is not
   expected. Expected is one of ( {http://www.opengis.net/gml}_Feature, {
   http://www.opengis.net/wfs}FeatureCollection ).
   5.
   6. [Thu Jan 23 04:45:19 2014] [ERROR] XML request isn't valid
   7.




Here's my tinyows.xml configuration file:

tinyows online_resource=https://geoinformatics.aalto.fi/kala/tinyows.cgi;
 schema_dir=/usr/local/share/tinyows/schema/
 log=/tmp/tinyows.log
 log_level=1
  pg host=localhost user=postgres password=* dbname=LAHTI
port=5432/

  metadata name=TinyOWS Server
title=Lahti Urban  WFS Server /

  layer retrievable=1
 writable=1
 ns_prefix=tows
 ns_uri=https://geoinformatics.aalto.fi/;
 name=subwatersheds
 title=subwatersheds /

 layer retrievable=1
 writable=1
 ns_prefix=tows
 ns_uri=https://geoinformatics.aalto.fi/;
 name=mk_city_centre
 title=Lahti City Centre
 exclude_items=the_geom3880 /
/tinyows

And finally, here is my OpenLayers editing client javascript code snippet:

  var saveStrategy = new OpenLayers.Strategy.Save();
  saveStrategy.events.register(success, '', showSuccessMsg);
  saveStrategy.events.register(fail, '', showFailureMsg);
  wfs = new OpenLayers.Layer.Vector(Editable Features, {
  strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
  projection: new OpenLayers.Projection(EPSG:3857),
  protocol: new OpenLayers.Protocol.WFS({
  version: 1.0.0,
  srsName: EPSG:3857,
  url: https://geoinformatics.aalto.fi/kala/tinyows.cgi;,
  featureNS :  https://geoinformatics.aalto.fi/;,
  featureType: mk_city_centre,
  geometryName: the_geom3857
  //schema: 
https://geoinformatics.aalto.fi/kala/tinyows.cgi?service=wfsversion=1.0.0request=DescribeFeatureTypetypeName=tows:mk_city_centre

  })
  });


I've never used TinyOWS before. Any Ideas what I'm doing wrong? Especially
the error message
Element '{https://geoinformatics.aalto.fi/}mk_city_centre': This element is
not expected. Expected is one of ( {http://www.opengis.net/gml}_Feature, {
http://www.opengis.net/wfs}FeatureCollection ).

is confusing.

Thanks in advance for any hints or suggestions how to solve the problem.

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

Re: [mapserver-users] TinyOWS insert feature not working

2014-01-22 Thread Rahkonen Jukka (Tike)
Hi,

You can try if you can have success with my server 
http://hip.latuviitta.org/cgi-bin/tinyows
Kosmo GIS which is an excellent open source GIS client for WFS creates the 
following request. Compare and see if you'll find something interesting.

?xml version='1.0' encoding='UTF-8'?
wfs:Transaction version=1.0.0 service=WFS xmlns:lv=http://latuviitta.fi/;
xmlns:gml=http://www.opengis.net/gml;
xmlns:ogc=http://www.opengis.net/ogc;
xmlns:wfs=http://www.opengis.net/wfs;
xmlns:xlink=http://www.w3.org/1999/xlink;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd 
http://hip.latuviitta.org/cgi-bin/tinyows?SERVICE=WFSamp;REQUEST=DescribeFeatureTypeamp;version=1.0.0amp;TYPENAME=lv:editable_multipolygonsamp;NAMESPACE=xmlns(lv=http://latuviitta.fi/)
 http://latuviitta.fi/;
wfs:Insert handle=insert1 idgen=GenerateNew
lv:editable_multipolygons xmlns:lv=http://latuviitta.fi/;
lv:geomgml:MultiPolygon xmlns:gml=http://www.opengis.net/gml; 
srsName=EPSG:3067
gml:polygonMember
gml:Polygon xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:3067
gml:outerBoundaryIs
gml:LinearRing
gml:coordinates195203.757,7279828.574 225034.737,7307065.556 
262647.711,7278531.575 260053.713,7238324.602 217252.742,7242215.6 
195203.757,7279828.574
/gml:coordinates
/gml:LinearRing
/gml:outerBoundaryIs
/gml:Polygon
/gml:polygonMember
/gml:MultiPolygon
/lv:geom
/lv:editable_multipolygons
/wfs:Insert
/wfs:Transaction

-Jukka Rahkonen-


 Jiří Kadlec wrote:

 I have installed and set-up TinyOWS for editing features from PostGIS 
 database on a RHEL6 Linux server.
 Displaying features is working OK in QGIS and in Openlayers.
 Editing a feature also works correctly.
 However, when I try to insert a new feature I get the following error 
 response:

?xml version='1.0' encoding='UTF-8'?
ows:ExceptionReport
 xmlns='http://www.opengis.net/ows'
 xmlns:ows='http://www.opengis.net/ows'
 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
 xsi:schemaLocation='http://www.opengis.net/ows 
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd'
 version='1.1.0' language='en'
 ows:Exception exceptionCode='InvalidParameterValue' locator='request'
  ows:ExceptionTextXML request isn't valid/ows:ExceptionText
 /ows:Exception
/ows:ExceptionReport

Here is the Request payload that gets posted to TinyOWS:

  1.  wfs:Transaction xmlns:wfs=http://www.opengis.net/wfs; service=WFS 
version=1.0.0 xsi:schemaLocation=http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;wfs:Insertfeature:mk_city_centre
 
xmlns:feature=https://geoinformatics.aalto.fi/;feature:the_geom3857gml:MultiPolygon
 xmlns:gml=http://www.opengis.net/gml; 
srsName=EPSG:3857gml:polygonMembergml:Polygongml:outerBoundaryIsgml:LinearRinggml:coordinates
 decimal=. cs=, ts= 2852436.2002366,8629373.6312116 
2851633.6114397,8628494.6053864 2850678.1485863,8629067.8830985 
2850563.4930439,8630176.2200085 
2852436.2002366,8629373.6312116/gml:coordinates/gml:LinearRing/gml:outerBoundaryIs/gml:Polygon/gml:polygonMember/gml:MultiPolygon/feature:the_geom3857/feature:mk_city_centre/wfs:Insert/wfs:Transaction



--
My TinyOWS error log shows:


  1.
  2.  [Thu Jan 23 04:45:19 2014] [ERROR] Element 
'{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at 
location 
'https://geoinformatics.aalto.fi/kala/tinyows.cgi?service=WFSrequest=DescribeFeatureTypeversion=1.0.0'.
 Skipping the import.
  3.
  4.  [Thu Jan 23 04:45:19 2014] [ERROR] Element 
'{https://geoinformatics.aalto.fi/}mk_city_centre': This element is not 
expected. Expected is one of ( {http://www.opengis.net/gml}_Feature, 
{http://www.opengis.net/wfs}FeatureCollection ).
  5.
  6.  [Thu Jan 23 04:45:19 2014] [ERROR] XML request isn't valid
  7.



Here's my tinyows.xml configuration file:

tinyows online_resource=https://geoinformatics.aalto.fi/kala/tinyows.cgi;
 schema_dir=/usr/local/share/tinyows/schema/
 log=/tmp/tinyows.log
 log_level=1
  pg host=localhost user=postgres password=* dbname=LAHTI 
port=5432/

  metadata name=TinyOWS Server
title=Lahti Urban  WFS Server /

  layer retrievable=1
 writable=1
 ns_prefix=tows
 ns_uri=https://geoinformatics.aalto.fi/;
 name=subwatersheds
 title=subwatersheds /

 layer retrievable=1
 writable=1
 ns_prefix=tows
 ns_uri=https://geoinformatics.aalto.fi/;
 name=mk_city_centre
 title=Lahti City Centre
 exclude_items=the_geom3880 /
/tinyows

And finally, here is my OpenLayers editing client javascript code snippet:

  var saveStrategy = new OpenLayers.Strategy.Save();
  saveStrategy.events.register(success, '', showSuccessMsg);
  saveStrategy.events.register(fail, '', showFailureMsg);
  wfs = new OpenLayers.Layer.Vector(Editable Features, {
  strategies: [new