I’m using the trial version in order to verify, that aspose.gis meets our needs.
I have problems converting as shape file into a kml file. The conversion works, but I think there is somethinw worng with the coordinates, that are written to the kml file.
To convert I did:
VectorLayer.Convert(ShapeFilename, Drivers.Shapefile, kmlpath, Drivers.Kml);
In the kml file the coordinates entry looks like:
13.8462224763658,51.6104028138417,0 13.8458616656399,51.6108146062704,0 13.8458614080007,51.6108247646665,0 …
Why do some values end with “,0” ? This is not correct, I think or am I wrong?
The coordianates itself are different from what I get from other products and they are different from what I get, when I use the Transform-Method of aspose.gis like this:
(I just noticed, that I missed some lines, when copying my code):
var coord= SpatialReferenceSystem.CreateFromEpsg(25833); var latLong = SpatialReferenceSystem.CreateFromEpsg(4326); var transformation = coord.CreateTransformationTo(latLong); var coordPoint = new Aspose.Gis.Geometries.Point(420109.34, 5718338.08); var geoPoint = transformation.Transform(coordPoint) as Aspose.Gis.Geometries.Point; // Write result WriteLog("Longitude: " + geoPoint.X); WriteLog("Latitude: " + geoPoint.Y);
Here the output is:
Longitude: 13,8462415352727 Latitude: 51,6104030011617
The coordinates are different from the highlighted one from above.
Is here something wrong or did I something wrong?
Thanks in advance.