Here’s a little tool for you that I’ve been using quite often lately. It can be used used to import Esri shapefiles into Microsoft SQL Server (2008 and 2012) while taking into account character encoding of the input data. The geospatial information is stored as SqlGeometry.
Nice thing about it is that it allows you to rename/remap destination table column names, choose the destination table name, and set the primary key for the table. And yeah, it has a user interface 🙂
The app is rather simple so I don’t think that further explanation about its usage is needed. If it turns out that I’ve been wrong, don’t hesitate to leave a comment.
I would like to point out one thing though. If you are not sure which encoding codepage to use, check this link
and look it up. The codepage default is 65001, which is the code page for UTF-8 encoding.
If you have any suggestions about improving the tool, or find a bug or something, leave a comment, I will be glad to update it.
Download exe from my Google Drive
EDIT: As there is some interest in this small app, and various different exceptions are thrown for different users, i am providing you with the source code so that you can see what is actually the problem. I was too lazy to catch every exception in the original program and were always returning the same message when the error occurs. The source code is hosted on GitHub, so that you can pull it or download as Zip.
If you update the code, please take time to push your changes back and help me update this small tool.
A quick fix would be to select desired plugin in tools -> Options -> Source Control.
There’s already a solution for this, you can convert both visual or UIElemnt to metafile… the only (and the biggest) drawback is that the metafile that you get is not a vector because you are pasting a bmp inside it… here are the links:
and the visuals addon taken from the microsoft forums:
private static BitmapSource CaptureScreen(Visual target, double dpiX, double dpiY)
if (target == null)
} Rect bounds = VisualTreeHelper.GetDescendantBounds(target); RenderTargetBitmap rtb = new RenderTargetBitmap((int)(bounds.Width * dpiX / 96.0),
(int)(bounds.Height * dpiY / 96.0),
PixelFormats.Pbgra32); DrawingVisual dv = new DrawingVisual();
using (DrawingContext ctx = dv.RenderOpen())
VisualBrush vb = new VisualBrush(target);
ctx.DrawRectangle(vb, null, new Rect(new Point(), bounds.Size));
} rtb.Render(dv); return rtb;
EDIT: if your visual/UIElement has transparent background, the code supplied above will make an image with black background… the workaround is to use the PngBitmapEncoder instead of BmpBitmapEncoder