Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How to work in Model item that have NetTopologySuite Geometry datatype in Asp.net core 3

$
0
0

Hi,

I'am working with the project the have spatial data. I used the NetTopologySuite to use Geometry / Point data type in my model. It's look like :

public Point GeoLocation { get; set; }

public string Street { get; set; }

public string PostalCode { get; set; }

public string City { get; set; }

public string Country { get; set; }

But when I excute my web api the json parameter on this is :

{"geoLocation":{"coordinateSequence":{"ordinates":0},"dimension":0,"boundaryDimension":0,"x":0,"y":0,"coordinate":{"x":0,"y":0,"z":0,"m":0},"ogcGeometryType":1,"boundary":{"factory":{"precisionModel":{"scale":0,"precisionModelType":0},"coordinateSequenceFactory":{"ordinates":0}},"userData":{},"srid":0,"ogcGeometryType":1,"precisionModel":{"scale":0,"precisionModelType":0},"coordinate":{"x":0,"y":0,"z":0,"m":0},"dimension":0,"boundaryDimension":0,"envelopeInternal":{"centre":{"x":0,"y":0,"z":0,"m":0}}},"z":0,"m":0,"factory":{"precisionModel":{"scale":0,"precisionModelType":0},"coordinateSequenceFactory":{"ordinates":0}},"userData":{},"srid":0,"precisionModel":{"scale":0,"precisionModelType":0},"envelope":{"factory":{"precisionModel":{"scale":0,"precisionModelType":0},"coordinateSequenceFactory":{"ordinates":0}},"userData":{},"srid":0,"ogcGeometryType":1,"precisionModel":{"scale":0,"precisionModelType":0},"coordinate":{"x":0,"y":0,"z":0,"m":0},"dimension":0,"boundaryDimension":0,"envelopeInternal":{"centre":{"x":0,"y":0,"z":0,"m":0}}},"envelopeInternal":{"centre":{"x":0,"y":0,"z":0,"m":0}}}

Is their a way to simplify it like 

( x , y )

Cause in postgreSQL in look this, Thanks


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>