Issue with EWKT

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Ossi
Posts: 3
Joined: Tue 15 Nov 2016 11:53

Issue with EWKT

Post by Ossi » Tue 15 Nov 2016 11:58

What is wrong with ToString() method with DBGeometry (ExtendendWkt)?

Code: Select all

> var geom = Devart.Data.PostgreSql.Entity.Spatials.PgSqlExtendedWktSpatialServices.CreateGeometry("LINESTRING(50027.21876 19769.808585,50030.39452 19797.435555,50035.47266 19821.66406,50039.70704 19836.53906,50045.3164 19853.115235,50057.17188 19880.7441475,50067.86328 19900.7207125,50074.10546 19910.921865,50088.82032 19931.748055,50097.28516 19942.375,50116.76172 19963.2011725,50134.01562 19978.5039075)");

//geometry object is created and all is good.
Console.Out.WriteLine(geom.AsText());
//LINESTRING(50027.21876 19769.808585,50030.39452 19797.435555,50035.47266 19821.66406,50039.70704 19836.53906,50045.3164 19853.115235,50057.17188 19880.7441475,50067.86328 19900.7207125,50074.10546 19910.921865,50088.82032 19931.748055,50097.28516 19942.375,50116.76172 19963.2011725,50134.01562 19978.5039075)

Console.Out.WriteLine(geom.ToString());
Invalid Extended Well-Known Text (EWKT) value 'LINESTRING(50027.21876 19769.808585,50030.39452 19797.435555,50035.47266 19821.66406,50039.70704 19836.53906,50045.3164 19853.115235,50057.17188 19880.7441475,50067.86328 19900.7207125,50074.10546 19910.921865,50088.82032 19931.748055,50097.28516 19942.375,50116.76172 19963.2011725,50134.01562 19978.5039075)'.
  + Devart.Common.Entity.b9.a(string, out int, out string, bool, bool, int)
  + Devart.Common.Entity.b9.b(string, out int, out string)
  + Devart.Common.Entity.EntityExtendedWktSpatialServices.CreateWellKnownValue(System.Data.Entity.Spatial.DbGeometry)
  + System.Data.Entity.Spatial.DbGeometry.ToString()

//ok, perhaps it is invalid or something...?
geom.IsValid;
This functionality is not supported by Extended Well-Known Text (EWKT) spatial service.
  + Devart.Common.Entity.EntitySpatialServices.GetIsValid(System.Data.Entity.Spatial.DbGeometry)
  + System.Data.Entity.Spatial.DbGeometry.get_IsValid()

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Issue with EWKT

Post by Shalex » Thu 17 Nov 2016 09:51

Thank you for your report. We will investigate the issue and notify you.

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Issue with EWKT

Post by Shalex » Wed 30 Nov 2016 19:29

1. Please use "SRID=0;LINESTRING([...]" instead of "LINESTRING([...]" to fix the issue with ToString().
EWKT = SRID + WKT

2. IsValid doesn't work with WKT / EWKT / WKB.

Post Reply