[mapserver-users] MapServer 6.4.1 OGR output error

Eichner, Andreas - SID Andreas.Eichner at sid.sachsen.de
Mon Feb 23 02:48:04 PST 2015


To me it seems the WFS code uses msReturnTemplateQuery() from maptemplate.c but this is not exported to (PHP-)MapScript... I would guess that the only way to get OGR output would be to fake a OWS-Request:

<?php
$map = ms_newMapObj("./toto.map");

$req = new OWSRequestObj();
$args = Array("service" => "WFS", "request" => "GetFeature", "version" => "1.1.0", "typename" => "Bati");
foreach($args as $param => $value) $req->setParameter($param, $value);
$req->setParameter("outputformat", $_REQUEST["type_fichier"]);

// $map->loadOWSParameters($req);
$map->owsDispatch($req);

?>

Requires enabling the request type and the output format:
WEB
	METADATA
		Ows_enable_request "*"
		Wfs_getfeature_formatlist "dxf midmif shapezip csv kmz"
	END
END


HTH

> -----Ursprüngliche Nachricht-----
> Von: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-
> bounces at lists.osgeo.org] Im Auftrag von Bruno D
> Gesendet: Freitag, 20. Februar 2015 16:27
> An: mapserver-users at lists.osgeo.org
> Betreff: Re: [mapserver-users] MapServer 6.4.1 OGR output error
> 
> Hi Andreas,
> 
> Thanks for your answer. I tried using savequeryasgml(), but it creates a
> blank gml file that only contains the following text :
> /<?xml version="1.0" encoding="ISO-8859-1"?>
> <msGMLOutput
> 	 xmlns:gml="http://www.opengis.net/gml"
> 	 xmlns:xlink="http://www.w3.org/1999/xlink"
> 	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> </msGMLOutput>/
> 
> I'll look into that, but as you stated there is almost no documentation...
> 
> Could someone who succeeded in outputting a DXF/SHP/... file through OGR
> post a working example ?
> 
> Thanks !
> 
> Bruno
> 
> 
> 
> --
> View this message in context: http://osgeo-
> org.1560.x6.nabble.com/MapServer-6-4-1-OGR-output-error-
> tp5172655p5188948.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


More information about the mapserver-users mailing list