SqlServer geography & NettopologySuite

Hello Radzen Team,
i have a question about spatial database (her: sqlServer) and how to get it to work in Radzen (if possible)

  1. I have installed the necessary packages:
    image
  2. I added it to UseSqlServer in Startup (dont know any other way, Startup in ignorelist, not nice...)
        services.AddDbContext<Trent.Data.TrentdbContext>(options =>
        {
          options.UseSqlServer(Configuration.GetConnectionString("trentdbConnection"),
                               x => x.UseNetTopologySuite());
        });

But... when i infer schema in Radzen the geography column do not appear in the Entities/Tables/Column List on the "Infer" PAge of Radzen.

Do you have any hints to me what to do to get it to work?
Or... can i get to work at all? (I realy dont want to put the startup class in the ignore list :-()

Kind Regards
Thomas

Hi @Thomas,

These types are not supported at the moment - the only option I can suggest is application ignore list.

Hi Thomas ,

Did you get this issue working ?

I mainly work wit Geo data in PostgreSQL database alongside a MSSQL database that is used with Radzen.
If Radzen can work with spatial data types maybe I can use only one
MSSQL database and move data from
PostgreSQL.

Thank you in advance for your reply.

Kind Regards,
Mehmet

Hi @mcanavar,
no. I didnt use any NetTopology functionality in mssql server.
to much effort to test if it brings any problems. i defined the model properties like
[LngGeo] DECIMAL(9, 6) NULL,
[LatGeo] DECIMAL(9, 6) NULL,
and do the calculations in seperate code in c#.

Greets
Thomas

1 Like

hi @mcanavar
We extended the Radzen generated class using the xxx.custom.cs feature and used a custom EF Core query. That's using MSQL, manually created spatial index, NetTopology, and net Core 3.1.