tangxiaodao / nettopologysuite

Automatically exported from code.google.com/p/nettopologysuite
0 stars 0 forks source link

Problems reading gml #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

1. Create a GML file from an Esri shapefile by using gdal ogr2ogr. 
The GML file seems valid, I can open it with f.ex GML Viewer from 
Snowflake Software. My GML/xsd files (output.gml, output.xsd) are 
attatched. 

2. Try to read your GML file into an IGeometry using the code below: 

private IGeometry readGML(string path) {
  GisSharpBlog.NetTopologySuite.IO.GML2.GMLReader reader = new 
GisSharpBlog.NetTopologySuite.IO.GML2.GMLReader();
  FileStream fs = File.OpenRead(path + ".gml");
  System.Xml.XmlReader xmlR = System.Xml.XmlReader.Create(fs);
  IGeometry ig = reader.Read(xmlR);
  xmlR.Close();
  return ig;
}

What is the expected output? What do you see instead?
I Expect an IGeometry with the data from the GML file. 
I Get an "Should never reach here!" Exception in the read method in 
GMLReader.cs. It seems that the GML parser does not expect the end element 
at row 10 in my GML file (</gml:X>)

What version of the product are you using? On what operating system?
NTS 1.7.3, WinXP

Original issue reported on code.google.com by henrik.k...@gmail.com on 12 Dec 2008 at 2:57

Attachments:

GoogleCodeExporter commented 8 years ago
GML is a not supported feature at this time :(
It's more like a proof of concept, but for now (and i fear for next months) 
it's not 
usable.
sorry

Original comment by diegogu...@gmail.com on 12 Dec 2008 at 6:29

GoogleCodeExporter commented 8 years ago
Ok, no problems :-) 
Is Shape considered to be a supported feature? 

Regards Henrik 

Original comment by henrik.k...@gmail.com on 15 Dec 2008 at 3:25

GoogleCodeExporter commented 8 years ago
if you mean shapefiles, yes

Original comment by diegogu...@gmail.com on 15 Dec 2008 at 4:09

GoogleCodeExporter commented 8 years ago
Yepp meant shapefiles :-) 
Have a nice Christmas and a happy New Year! 

/Henrik 

Original comment by henrik.k...@gmail.com on 19 Dec 2008 at 11:06