Hi Sergei,
No need to apologize :)
A colleague of mine thought to do a SQL trace during the save operation and this is what he saw:
Another bit of information that might help is this: We use schemas besides the default dbo schema. When I imported a layer with the ogr2ogr CLI tool into dbo, then MapWingGIS again saw only that new layer. It seems that if there is a GIS table in the dbo schema that MapWinGIS ignores all other GIS tables in other schemas. So I don't think the problem lies in how MapWinGIS saves the layer, but rather just in the loading.
Thanks
No need to apologize :)
A colleague of mine thought to do a SQL trace during the save operation and this is what he saw:
exec sp_executesql N'UPDATE [geo].[power_plants] SET geometry::STGeomFromWKB(@P1,4269).MakeValid(), [status] = @P2, [match_addr] = 85322, [name] = @P3, [city] = @P4, [ymax] = 0, [postal] = @P5, [arc_zip4] = @P6, [water cons] = 40, [score] = 100, [pretype] = @P7, [zip 1] = 85322, [zip] = @P8, [side] = @P9, [xmax] = 0, [arc_addres] = @P10, [addr_type] = @P11, [suftype] = @P12, [latitude] = 33.10490596, [match_type] = @P13, [x] = -112.820148, [sufdir] = @P14, [arc_city] = @P15, [arc_zip] = 85322, [county] = @P16, [y] = 33.104906, [streetname] = @P17, [ymin] = 0, [state_1] = @P18, [loc_name] = @P19, [fuel type] = @P20, [operator] = @P21, [house] = @P22, [xmin] = 0, [arc_state] = @P23, [newtotalpl] = 1239, [arc_countr] = @P24, [disp_lat] = 0, [internal f] = 3, [disp_lon] = 0, [ldu] = @P25, [zip4 type] = @P26, [street add] = @P27, [objectid] = 6, [zip4] = @P28, [longitude] = -112.8201473, [province] = @P29, [state] = @P30, [city 1] = @P31, [predir] = @P32, [user_fld] = 0 WHERE [FID] = 3',N'@P1 image,@P2 nvarchar(2),@P3 nvarchar(33),@P4 nvarchar(10),@P5 nvarchar(1),@P6 nvarchar(1),@P7 nvarchar(1),@P8 nvarchar(6),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(18),@P12 nvarchar(1),@P13 nvarchar(2),@P14 nvarchar(1),@P15 nvarchar(10),@P16 nvarchar(9),@P17 nvarchar(1),@P18 nvarchar(3),@P19 nvarchar(11),@P20 nvarchar(12),@P21 nvarchar(21),@P22 nvarchar(1),@P23 nvarchar(3),@P24 nvarchar(1),@P25 nvarchar(1),@P26 nvarchar(1),@P27 nvarchar(20),@P28 nvarchar(1),@P29 nvarchar(1),@P30 nvarchar(3),@P31 nvarchar(1),@P32 nvarchar(1)',0x0101000000C6D9194B7D345CC081ADF98E6D8D4040,N'M',N'Arlington Valley Energy Facility',N'Arlington',N'',N'',N'',N'85322',N'',N'',N'Postal 2 dasdasda',N'',N'A',N'',N'Arlington',N'Maricopa',N'',N'AZ',N'US_Zipcode',N'Natural Gas',N'Arlington Valley LLC',N'',N'AZ',N'',N'',N'',N'39027 W Elliot Road',N'',N'',N'AZ',N'',N''
Specifically, the SQL code is missing the geometry column and the = operator. So instead of SET geometry::STGeomFromWKB
it should be SET geom = geometry::STGeomFromWKB
where geom is the geometry column in my case.Another bit of information that might help is this: We use schemas besides the default dbo schema. When I imported a layer with the ogr2ogr CLI tool into dbo, then MapWingGIS again saw only that new layer. It seems that if there is a GIS table in the dbo schema that MapWinGIS ignores all other GIS tables in other schemas. So I don't think the problem lies in how MapWinGIS saves the layer, but rather just in the loading.
Thanks