[OSM-talk] GML to OSM (Re: convert mapinfo POI to osm for uploading )

Iván Sánchez Ortega ivansanchez at escomposlinux.org
Sat Mar 29 15:30:00 GMT 2008


El Sábado, 29 de Marzo de 2008, Iván Sánchez Ortega escribió:
> El Sábado, 29 de Marzo de 2008, Frederik Ramm escribió:
> > Hi,
> >
> > > Are there any updates on this script?  Desperately needed for a public
> > > domain data available as GML.
> > > http://gis.naga.gov.ph/pmwiki/pmwiki.php/Main/Data
> >
> > No GML on that page?
>
> The data that can be downloaded from WFS is most usually GML.

In fact, downloading the data as GML is as simple as:

<?php

/// Given the XML capabilities document of the Naga City WFS server, 
/// downloads all the layers
/// TODO: generalize the script??

$xml = 
simplexml_load_file('http://gis.naga.gov.ph/cgi-bin/mapserv?MAP=/home/senenebio/public_html/nagacity_data.map&SERVICE=WFS&VERSION=1.1.1&REQUEST=GetCapabilities');

foreach($xml->FeatureTypeList->FeatureType as $layer)
{

	echo "-----------\n
	Downloading data from layer:\n";

	print_r($layer);
	
passthru("wget 'http://gis.naga.gov.ph/cgi-bin/mapserv?MAP=/home/senenebio/public_html/nagacity_data.map&SERVICE=WMS&VERSION=1.1.1&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME={$layer->Name}' -O 
{$layer->Name}.gml -c");
	
}

?>



I'll try have a look at the GML2OSM script...

-- 
----------------------------------
Iván Sánchez Ortega <ivansanchez at escomposlinux.org>

Un ordenador no es un televisor ni un microondas, es una herramienta compleja.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20080329/6f034720/attachment.pgp>


More information about the talk mailing list