Tag Info

Hot answers tagged

10

You Can use ogr2ogr. Simplest to install it would be to download fwTools. the following command will do ogr2ogr -f "GeoJSON" E:\lakes.geojson e:\lakes.gml Else if you have QuantumGIS, you can add your GML layer to map and by Right-Clicking the Layer, Select Save As to GeoJSON format.


9

A great GIS that has a huge amount of functionality is QGIS. It is very easy to install especially if you use the osgeo4w installer (Windows). You can use it to view your GML file too. OSGeo is the place you want to look for OpenSource (free) GIS tools and libraries: http://www.osgeo.org/. You will find a ton of stuff here plus links to QGIS and other ...


9

GML, http://en.wikipedia.org/wiki/Geography_Markup_Language KML, http://en.wikipedia.org/wiki/Keyhole_Markup_Language GML / KML difference http://en.wikipedia.org/wiki/Geography_Markup_Language#GML_and_KML


9

If it is for using and editing in a gis system i would stick to shapefiles. This format is well supported by all GIS software.


7

You can analyze polylines in amazing ways by using buffers. This is usually inefficient--buffers create many additional vertices--but (a) it is a technique available in many GISes (vector or raster based) and (b) it sometimes can produce information that is otherwise hard to get. In this case, buffering the road by a small amount and then buffering by the ...


7

If you have the roads in a spatial form, such as a Shapefile, you can load them into PostGIS and have it automatically find those using an SQL query. I've done this before - the SQL statement is designed to find for each road those that intersect geographically and create a nodal point for each crossing. I will try to clean this up later, but here is the ...


7

From W3C's Extensible Markup Language (XML) 1.0 (Fifth Edition) recommendation: [Definition: The XML document type declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition, or DTD. The document type declaration can point to an external subset (a special kind ...


6

In ArcPy, you can do a table to table conversion, which supports csv. from ESRI: "For file input (.csv or .txt), the first row of the input file is used as the field names on the output table. Field names cannot contain spaces or special characters (such as $ or *), and you will receive an error if the first row of input file contains spaces or special ...


6

I'd suggest starting from http://www.w3.org/Mobile/posdep/GMLIntroduction.html. If you're planning to work with application schemes in INSPIRE, you'll also need a thorough understanding of XML and XSLT (Extensible Stylesheet Language Transformations). I think the task doesn't require in-depth understanding of UML. You'll have to be able to read it. Anyway, ...


6

You need to use GDAL 1.8.0 or above to be able to read this kind of GML3 geometry.


6

Same reason --> OGR does not support multiple geometries in one feature http://www.weichand.de/2012/08/26/qgis-wfs-2-0-plugin-update/comment-page-1/#comment-8177 ~~ UPDATE ~~ After the first import of your GML-file there will be a .gfs file in the same directory. This file contains the following part: <Name>CadastralParcel</Name> ...


5

You can use the DataInteroperability (DI) - Import/Export tool (using IGPTool) for the same. The extension is enabled by default for ArcEditor for certain formats (including CSV and GML) and allows data to be read/written. I've done a similar export (to GML) some time back and it works perfectly!


5

Looks like you have GML3 but ogr2ogr is expecting it to be GML2. According to the docs (http://www.gdal.org/ogr/drv_gml.html) only GML 2 or GML 3 Simple Feature is supported, since GML3 SF doesn't support surfaces either I'd say you are out of luck. I'm also not entirely sure if a shapefile can support surfaces either so I suspect that you are going to run ...


5

When someone designs a class of XML documents for representing information in a particular domain, they will sometimes call this an XML grammar, or a vocabulary, or a schema, or a document type, or even a language. The terminology isn't consistent. There's perhaps a different emphasis: calling it a schema implies that an XML Schema is the primary way in ...


5

Every XML document essentially has some given structure. When the structure is formally specified, we usually talk about a given XML grammar. The formal specification can take many forms, e. g. DTD (Document Type Definition) or XML Schema Definition (XSD). XSD itself is a XML document and is now being used for GML. There are also other means of specifying ...


5

I don't understand if lines are understood by QGIS on kml layer well enough to be saved as Shapefile I'm not aware of any problems. If the lines are displayed correctly on the map, export to Shapefile should work too. You already found the solution: Save the GML as Shapefile and you can edit that. From the mailing list: The state of the "Toggle ...


5

You can use Python shapefile library pyshp >>> import shapefile >>> sf = shapefile.Reader("shapefiles/blockgroups") >>> shapes = sf.shapes() >>> # Read the bounding box from the 4th shape >>> shapes[3].bbox [-122.485792, 37.786931000000003, -122.446285, 37.811019000000002] >>># Read the 8th point in the ...


5

Grab a copy of the ogr2ogr Python port, which is distributed with the GDAL source code download or can be found here: http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/ogr2ogr.py Once you import that into your code, you can use it like this: import ogr2ogr def main(): #note: main is expecting sys.argv, where the first argument is the script name ...


4

You can also look at http://svn.osgeo.org/geotools/trunk/modules/library/xml/src/test/java/org/geotools/GMLTest.java to see how the tests do it. The key section seems to be: GML encode2 = new GML(Version.GML2); encode2.setBaseURL(baseURL); encode2.setNamespace("location", "location.xsd"); encode2.encode(out2, collection); out.close(); ...


4

I would really need to see your URL to comment on why it doesn't work. Have you tried something like http://ian01.geog.psu.edu:80/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&outputFormat=GML2 In general though WFS requests are made using POST (not GET) with an XML payload to handle the request as it is easy to run into ...


4

Yes, you could do this with FME for sure. There are many "transformers" that handle cleanup, intersections, and topology; I would try the TopologyBuilder transformer in this case. Any scripting is all done in a graphic environment, so it is very simple to do. You can always get a trial version from www.safe.com (Disclosure: Mark Ireland, aka FME ...


4

ST_GeomFromGML You can store your GML features as a PostGIS Geometry datatype by using the ST_GeomFromGML function which will convert your GML to the geometry datatype. FYI: There are similar functions for KML, WKT, and so on. just do something like: INSERT into myTable (mygeomField) values (ST_GeomFromGML(' <gml:LineString srsName="EPSG:4269"> ...


4

Check in Firebug (Firefox) or Fiddler (IE) if your file internet_users_2005.json.fixed is in fact being loaded. I suspect there's a problem with the path.


4

You can try some of the CanVec data, available here. Some of those files range from 4 MB to 50GB, depending on the one you choose.


4

You could give the GDAL/OGR utility ogr2ogr a try. It has to capability to convert between many formats of vector spatial data. GDAL/OGR Downloads ogr2ogr Utility OGR GML Driver Documentation Depending on the flavor of your XML/GML it may be able to extract the spatial components straight away, and be as simple as: ogr2ogr -f "esri shapefile" ...


4

Based on Filter Encoding with Spatial Filter within WFS-Request and Geoserver Filter. I found that there is a parameter named filter and the value can enter like this: ...


4

You can't really choose either because as a GIS Professional data will come at you in a million different formats and you need to handle everything. This is why GDAL/OGR has so many translation algorithms. More importantly, neither format is a 'beautiful' way of managing and storing GIS data. For real GIS data management you want to use one of the ...


4

Maybe this triggers some new ideas: I've got an application running where users can edit a map with many elements. Instead of sending all data as WFS, I use WMS maps, and when the user clicks, or draws a selection, I fetch the selected items as WFS. After sending an update back to the server, I refresh the WMS layer. There are some OpenLayers examples ...


4

I enjoy using ElementTree. It's standardized in Python since 2.5 as xml.etree.ElementTree. Forgive me for being blunt, but you're using it wrong. I suggest trying the find, findtext, and findall methods when you know the structure of the data. Is Order your root element? If so, >>> geography = rootElement.find('OrderRequest/SiteGeography') ...



Only top voted, non community-wiki answers of a minimum length are eligible