Comments (11)
GMLWriter writes a GML "representation" of a Geometry: a GML fragment and not a complete GML document.
To create a "valid" GML document, you (or we) should create a writer that, at least, takes a list of IFeature, then manage geometry AND attributes to generate A GML document, that at least contains initial xml declaration and namespace imports.
from nettopologysuite.
Hi, thanks for the feedback. I managed to use sharpkml to get a quick usable output, but it would be good to see an export to gml file option.
from nettopologysuite.
If I got it right, the problem is the wrapping <gml:GML></gml:GML>
tag that is created using the writer. At least JTS does not write that in its xml.
from nettopologysuite.
Have you tried to read JTS GML output with QGIS?
I suspect you can obtain another error, jost becaus the GML fragment isn't a GML/XML valid document.
Anyway, remove gml namespace can be a valid strategy, at least to maintain JTS behavior.
from nettopologysuite.
Having said that, I think the API should change and the GMLWriter.Write
functions should take an XmlWriter as argument, thus knowing which namespaces have already been defined to not pollute the file with namespace declarations.
from nettopologysuite.
As a comparison:
JTS:
<gml:Point>
<gml:coordinates>
52,-0.9
</gml:coordinates>
</gml:Point>`
NTS:
<gml:GML xmlns:gml="http://www.opengis.net/gml">
<gml:Point>
<gml:coord>
<gml:X>52</gml:X>
<gml:Y>-0.9</gml:Y>
</gml:coord>
</gml:Point>
</gml:GML>
from nettopologysuite.
I'm working on a pull request.
Actually, I don't remember the meaning of gml:GML tag, I remember that code was modified for MSSQLSpatial purposes...
Anyway, code fixes to made output like JTS one is trivial.
I don't actually know how many existing code this change can break.
from nettopologysuite.
+1 for change the API
from nettopologysuite.
@FObermaier @RobertSmart please check. Hope this fix the problem.
from nettopologysuite.
can I close this issue now?
from nettopologysuite.
I haven't had time to check, but if matches the JTS implementation, then it should be fine to close now.
Thanks, Rob
from nettopologysuite.
Related Issues (20)
- How to avoid problem with ConcaveHull? HOT 4
- Difference problem
- GeometryPrecisionReducer not working for LineString (PrecisionModel)
- Could not load file or assembly 'System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
- Why holes do not applies to shells in Polygonizer?
- LineSegment.OrientationIndex returns a wrong value HOT 1
- DistanceOp.ComputeMinDistancePoints should be fixed for empty points. HOT 1
- TriangleEdgesListVisitor.Visit can fail with FetchTriangleToVisit. HOT 2
- PointLocator.ComputeLocation does not handle empty values
- how to get polygon with holes OR not overlapping polygons from list of LINESTRING HOT 2
- [WKBReader]Geometry type not recognized. GeometryCode: 16 HOT 1
- ST_Transform on parameter geometry HOT 1
- GeometryFactory.CreateEmpty throws exception when passed Dimension.Dontcare HOT 1
- Difference between Geometries created by NetTopologySuite 6 and 8 HOT 3
- MultiPoint Reverse implementation is not a reverse HOT 1
- Can you request a nuget package prefix for NetTopologySuite HOT 5
- An error create instance of STRtree class HOT 1
- Add Additional TFM so dependencies can be reduced
- Add additional TFM to enable a 0 dependency scenario HOT 1
- Invalid Z coordinate is added to geometry point with X and Z coordinates HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nettopologysuite.