[MS4W-Users] MS4W 3.0.4beta1 and still no luck with WFS and OGR output

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[MS4W-Users] MS4W 3.0.4beta1 and still no luck with WFS and OGR output

Rahkonen Jukka (Tike)
Hi,
 
I was hoping that the new version would make my OGR output trials to work but unfortunately I can only get error messages like these:
 
[Thu Feb 09 17:21:28 2012].789000 msOGRWriteFromQuery(): General error message. Failed to open result file 'd:/ms4w/tmp/4f33e478_fac_0/out.txt'.
[Thu Feb 09 17:22:38 2012].139000 msOGRWriteFromQuery(): General error message. Failed to open result file 'd:/ms4w/tmp/4f33e4be_a08_0/out.txt'.
I do not see any obvious errors in my mapfile and normat GML output works great. If someone has made this to work with shapefiles I would love to see the mapfile. Below is mine.
 
MAP
OUTPUTFORMAT
  NAME "CSV"
  DRIVER "OGR/CSV"
  MIMETYPE "text/csv"
  FORMATOPTION "LCO:GEOMETRY=AS_WKT"
  FORMATOPTION "STORAGE=filesystem"
  FORMATOPTION "FORM=simple"
  FORMATOPTION "FILENAME=%outfile%"
END
MAXSIZE 4000
SIZE 800 800
EXTENT 61600 6597900 733000 7776800 #euref
UNITS meters
IMAGECOLOR 20 250 250
WEB
    IMAGEPATH "d:/ms4w/tmp/"
    TEMPPATH "d:/ms4w/tmp/"
    METADATA
        "outfile_validation_pattern" "."
        "default_outfile" "out.txt"
        "ows_enable_request" "*" 
        "wfs_encoding" "UTF-8"
        "wfs_namespace_prefix" "lv"
        "wfs_namespace_uri" "http://latuviitta.org"
        "wfs_abstract" "Mapserver 6.0 WFS"
        "wfs_getfeature_formatlist" "CSV"    
        "wfs_srs" "EPSG:3067 EPSG:4326 EPSG:2393 EPSG:900913"
        "wfs_title" "Mapserver-WFS"
        "wms_onlineresource" "http://localhost/cgi-bin/mapserv?map=/ms4w/map/mapserver60_wfs_test.map"
     END
END
#DEBUG 10
CONFIG "PROJ_LIB" "/ms4w/proj/nad"
CONFIG "MS_ERRORFILE" "/ms4w/tmp/wfs_error.log"
PROJECTION
"init=epsg:3067"
END
LAYER
    TYPE POLYGON
    STATUS ON
    PROJECTION
        "init=epsg:3067"
        #Finnish ETRS-TM35FIN projection
    END
    NAME "wfs_polygons"
    #CONNECTIONTYPE OGR                             #same result with OGR connection
    #CONNECTION "/ms4w/map/AVI1_p.shp"        #same result with OGR connection
    DATA "/ms4w/map/AVI1_p.shp"
    METADATA
      "wfs_title" "wfs_polygons"
      "gml_include_items" "all"
    END
    DUMP TRUE
    DEBUG 5
    CLASS
       STYLE
    COLOR "#FF6767"
       END
    END
END
END
 
Regards,
 
-Jukka Rahkonen-

_______________________________________________
MS4W-Users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ms4w-users
Reply | Threaded
Open this post in threaded view
|

Re: MS4W 3.0.4beta1 and still no luck with WFS and OGR output

jmckenna
Administrator
On 12-02-09 11:38 AM, Rahkonen Jukka wrote:

> Hi,
> I was hoping that the new version would make my OGR output trials to
> work but unfortunately I can only get error messages like these:
> [Thu Feb 09 17:21:28 2012].789000 msOGRWriteFromQuery(): General error
> message. Failed to open result file 'd:/ms4w/tmp/4f33e478_fac_0/out.txt'.
> [Thu Feb 09 17:22:38 2012].139000 msOGRWriteFromQuery(): General error
> message. Failed to open result file 'd:/ms4w/tmp/4f33e4be_a08_0/out.txt'.
> I do not see any obvious errors in my mapfile and normat GML output
> works great. If someone has made this to work with shapefiles I would
> love to see the mapfile. Below is mine.

I did quite a lot of testing with MS4W and OGR output recently, and the
files that I used are in the ticket
http://trac.osgeo.org/mapserver/ticket/3751  (see specific comment
http://trac.osgeo.org/mapserver/ticket/3751#comment:22) If you can't use
those files, then you could create your own package, test it on linux
and windows, and then try to narrow it that way.  You could have found a
bug, that applies to linux and windows, or just windows, or just
MS4W...more testing with the same small package is the only way (yes, a
lot of work).

-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


_______________________________________________
MS4W-Users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ms4w-users
Reply | Threaded
Open this post in threaded view
|

Re: MS4W 3.0.4beta1 and still no luck with WFS and OGR output

Rahkonen Jukka (Tike)
In reply to this post by Rahkonen Jukka (Tike)
Hi,

This is quite a funny issue. I managed to get both the CVS and SHAPEZIP outputs to work with my own shapefile by using the mike-settings mapfile as a template http://trac.osgeo.org/mapserver/raw-attachment/ticket/3751/ogr-outputformat-mike-settings.map.  I tried also with two other old mapfiles I had and they worked also.  And more good news, both STORAGE=memory and STORAGE=filesystem setting worked.

However, I was suspicious and thought that it was too good to be true and therefore I stopped Apache server, started it again and repeated the test. Yeah, I started to get the Failed to open result file errors again and after four hours struggle I decided to surrender. I just could not make it to work another time for me on this computer.

I switched to OGR connection and turned the CPL_DEBUG ON and I could collect a bit more debug data. Here is an example of what I get into the log file when doing GetFeature with outputformat=CSV


[Fri Feb 10 01:14:46 2012].111000 msOGRFileOpen(/ms4w/map/AVI1_p.shp)...
[Fri Feb 10 01:14:46 2012].111000 OGROPen(/ms4w/map/AVI1_p.shp)
[Fri Feb 10 01:14:46 2012].142000 msConnPoolRegister(wfs_polygons,/ms4w/map/AVI1_p.shp,036830B8)
[Fri Feb 10 01:14:46 2012].142000 msOGRLayerClose(/ms4w/map/AVI1_p.shp).
[Fri Feb 10 01:14:46 2012].142000 msOGRFileClose(/ms4w/map/AVI1_p.shp,0).
[Fri Feb 10 01:14:46 2012].142000 msConnPoolRelease(wfs_polygons,/ms4w/map/AVI1_p.shp,036830B8)
[Fri Feb 10 01:14:46 2012].142000 msConnPoolClose(/ms4w/map/AVI1_p.shp,036830B8)
[Fri Feb 10 01:14:46 2012].142000 msOGRFileOpen(/ms4w/map/AVI1_p.shp)...
[Fri Feb 10 01:14:46 2012].142000 OGROPen(/ms4w/map/AVI1_p.shp)
[Fri Feb 10 01:14:46 2012].142000 msConnPoolRegister(wfs_polygons,/ms4w/map/AVI1_p.shp,036830B8)
[Fri Feb 10 01:14:46 2012].142000 msOGRFileWhichShapes: Setting spatial filter to 61684.268865 6605837.973442 732897.059148 7776424.225810
[Fri Feb 10 01:14:46 2012].142000 msOGRFileNextShape: Returning shape=0, tile=0
[Fri Feb 10 01:14:46 2012].142000 msOGRFileNextShape: Returning shape=1, tile=0
[Fri Feb 10 01:14:46 2012].142000 msOGRFileNextShape: Returning shape=2, tile=0
[Fri Feb 10 01:14:46 2012].142000 msOGRFileNextShape: Returning shape=3, tile=0
[Fri Feb 10 01:14:46 2012].142000 msOGRFileNextShape: Returning shape=4, tile=0
[Fri Feb 10 01:14:46 2012].142000 msOGRFileNextShape: Returning shape=5, tile=0
[Fri Feb 10 01:14:46 2012].142000 msOGRFileNextShape: Returning shape=6, tile=0
[Fri Feb 10 01:14:46 2012].142000 msOGRFileNextShape: Returning MS_DONE (no more shapes)
[Fri Feb 10 01:14:46 2012].579000 msOGRWriteFromQuery(): General error message. Failed to open result file 'd:/ms4w/tmp/4f345366_1e08_0/out.txt'.
[Fri Feb 10 01:14:46 2012].579000 freeLayer(): freeing layer at 03671118.
[Fri Feb 10 01:14:46 2012].579000 msOGRLayerClose(/ms4w/map/AVI1_p.shp).
[Fri Feb 10 01:14:46 2012].579000 msOGRFileClose(/ms4w/map/AVI1_p.shp,0).
[Fri Feb 10 01:14:46 2012].579000 msConnPoolRelease(wfs_polygons,/ms4w/map/AVI1_p.shp,036830B8)
[Fri Feb 10 01:14:46 2012].579000 msConnPoolClose(/ms4w/map/AVI1_p.shp,036830B8)

I believe this is not a MS4W issue but something more general Mapserver issue. It seems to be related to writing or reading the temporary result set into disk or memory but fear I have done all that I can.

Regards,

-Jukka Rahkonen-

________________________________
Rahkonen Jukka wrote:

> Hi,

> I was hoping that the new version would make my OGR output trials to work but unfortunately I can only get error messages like these:

[Thu Feb 09 17:21:28 2012].789000 msOGRWriteFromQuery(): General error message. Failed to open result file 'd:/ms4w/tmp/4f33e478_fac_0/out.txt'.
[Thu Feb 09 17:22:38 2012].139000 msOGRWriteFromQuery(): General error message. Failed to open result file 'd:/ms4w/tmp/4f33e4be_a08_0/out.txt'.
I do not see any obvious errors in my mapfile and normat GML output works great. If someone has made this to work with shapefiles I would love to see the mapfile. Below is mine.

MAP
OUTPUTFORMAT
  NAME "CSV"
  DRIVER "OGR/CSV"
  MIMETYPE "text/csv"
  FORMATOPTION "LCO:GEOMETRY=AS_WKT"
  FORMATOPTION "STORAGE=filesystem"
  FORMATOPTION "FORM=simple"
  FORMATOPTION "FILENAME=%outfile%"
END
MAXSIZE 4000
SIZE 800 800
EXTENT 61600 6597900 733000 7776800 #euref
UNITS meters
IMAGECOLOR 20 250 250
WEB
    IMAGEPATH "d:/ms4w/tmp/"
    TEMPPATH "d:/ms4w/tmp/"
    METADATA
        "outfile_validation_pattern" "."
        "default_outfile" "out.txt"
        "ows_enable_request" "*"
        "wfs_encoding" "UTF-8"
        "wfs_namespace_prefix" "lv"
        "wfs_namespace_uri" "http://latuviitta.org"
        "wfs_abstract" "Mapserver 6.0 WFS"
        "wfs_getfeature_formatlist" "CSV"
        "wfs_srs" "EPSG:3067 EPSG:4326 EPSG:2393 EPSG:900913"
        "wfs_title" "Mapserver-WFS"
        "wms_onlineresource" "http://localhost/cgi-bin/mapserv?map=/ms4w/map/mapserver60_wfs_test.map"
     END
END
#DEBUG 10
CONFIG "PROJ_LIB" "/ms4w/proj/nad"
CONFIG "MS_ERRORFILE" "/ms4w/tmp/wfs_error.log"
PROJECTION
"init=epsg:3067"
END
LAYER
    TYPE POLYGON
    STATUS ON
    PROJECTION
        "init=epsg:3067"
        #Finnish ETRS-TM35FIN projection
    END
    NAME "wfs_polygons"
    #CONNECTIONTYPE OGR                             #same result with OGR connection
    #CONNECTION "/ms4w/map/AVI1_p.shp"        #same result with OGR connection
    DATA "/ms4w/map/AVI1_p.shp"
    METADATA
      "wfs_title" "wfs_polygons"
      "gml_include_items" "all"
    END
    DUMP TRUE
    DEBUG 5
    CLASS
       STYLE
    COLOR "#FF6767"
       END
    END
END
END

Regards,

-Jukka Rahkonen-
_______________________________________________
MS4W-Users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ms4w-users
Reply | Threaded
Open this post in threaded view
|

Re: MS4W 3.0.4beta1 and still no luck with WFS and OGR output

jmckenna
Administrator

> If someone has made this to work with shapefiles I would love to see the mapfile.

The small test package that I created for that ticket does use a
shapefile :)  http://trac.osgeo.org/mapserver/ticket/3751#comment:22

I would agree that recently there seems to be an occasional
temp-writing-issue on both linux and windows, although as I mentioned I
did not have problems at the time of my testing in that ticket.  I'll
keep my eyes open for it though.

-jeff



--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


_______________________________________________
MS4W-Users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ms4w-users