English 中文(简体)
how to create image from gis data in C#
原标题:

I m using C# to pull spatial data from a sql server 2008 database. I m then trying to perform operations on that data, but to start... I want to be able to visualize it. That is, I would like to create an image of the data, preferably in jpg format.

I thought that I might do it by hand, but that is proving more challenging than I had originally thought that it would, given that the degrees are not whole numbers, and I can t just truncate them to draw onto a graphics object.

Can someone point me to the right library that might help me to perform this operation?

NOTE: Paying for a library is not an option for me, at this time.

最佳回答

Not sure if you want to create images in your program using C# or if you just want to see some images in any way possible outside of your program (you didn t state either way). If you just want a stand alone GUI for doing this, there is QuantumGIS which is free and can visually represent GIS data for you. It was invaluable for me when I started figuring out geospatial data, it looks like this:

alt text http://www.gaia-gis.it/spatialite/resource/qgis1.png

You could also use the SqlSpatial tool from SharpGIS:

alt text
(source: bostongis.com)

问题回答

You can export the data to google earth. The API also allows you to take screenshots programatically.

You can use SharpMap to view or export GIS data. It is native C# and doesn´t have many dependencies.

A translator library for raster and vector geospatial data formats that is released under an X/MIT style Open Source license by the Open Source Geospatial Foundation. As a library, it presents a single raster abstract data model and single vector abstract data model to the calling application for all supported formats. It also comes with a variety of useful command line utilities for data translation and processing. The NEWS page describes the January 2017 GDAL/OGR 2.1.3 release.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签