apdevelop / linq2db-postgis-extensions

.NET Standard 2.0 library with extensions methods for PostGIS geometries methods access with linq2db
MIT License
18 stars 5 forks source link

any idea about type mapping of box2/3d? #10

Open sharkAndshark opened 3 years ago

sharkAndshark commented 3 years ago

Am wondering following way dealing with Input/output about box2/3d is too dirty and evil?

[Sql.Expression("ST_Box2dFromGeoHash({0},{1})::geometry",ServerSideOnly = true)]
public static NTSG STBox2dFromGeoHash(string geohash, int precision)
{
    throw new InvalidOperationException();
}
apdevelop commented 3 years ago

Will investigate it in future; now I want to complete implementation for most methods with geometry type first of all. Your suggestion can be a last resort, if there will be no way to work with box2d PostGIS type in underlying NTS type system. There is similar discussion for EFCore: Provide mapping for Envelope