From GXT to Raster/Grid
profnimrod
Global Mapper User
Hi Forum
I'm just trying out the C# SDK to see if it has what I need. What I am trying to do is take a GXT file containing satellite EIRP data, and convert it to a Grid/Raster array of some kind with interpolation (which I will then re-contour with different levels).
So far I have imported the GXT and created an array that contains the contours contained in the file.
To be honest I haven't the fainest idea of how to now proceed. I'm pretty sure my custom format doesn't fit whatever is needed for me to convert to raster using the GeoCore SDK. So please any tips or code snippets on how to do this would be gratefully received.
Also, I'd like to be able to take grid data and generate an array of closed contours. I have already written a method to do this in c# and it works just fine, but I'm hoping GeoCore will contain a similar method that will run much faster than my method that was thrown together in a few days.
Kind regards, Kurt
I'm just trying out the C# SDK to see if it has what I need. What I am trying to do is take a GXT file containing satellite EIRP data, and convert it to a Grid/Raster array of some kind with interpolation (which I will then re-contour with different levels).
So far I have imported the GXT and created an array that contains the contours contained in the file.
To be honest I haven't the fainest idea of how to now proceed. I'm pretty sure my custom format doesn't fit whatever is needed for me to convert to raster using the GeoCore SDK. So please any tips or code snippets on how to do this would be gratefully received.
Also, I'd like to be able to take grid data and generate an array of closed contours. I have already written a method to do this in c# and it works just fine, but I'm hoping GeoCore will contain a similar method that will run much faster than my method that was thrown together in a few days.
Kind regards, Kurt
Comments
-
Kurt,
Are you using the Global Mapper SDK or the GeoCore SDK (a different Blue Marble product)? Assuming you are using the Global Mapper SDK and you have a layer with your contour lines in it, you can use the GM_GenerateElevationGrid function to create an elevation grid from the contour layer. You can then export that to any raster format using GM_ExportRaster or a gridded elevation file (like a DEM) using GM_ExportElevation.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/ -
Thanks Mike
I am indeed using the Global Mapper SDK as you assumed. How do I create "a layer with your contour lines in it"? Bear in mind I'm not using any for the UI features, this is to all be in code only.
Glad to hear that once I achieve this first 'import' step, it looks like just what I need is available via GM_GenerateElevationGrid and GM_ExportRaster.
Kind regards, Kurt -
Kurt,
It sounds like you already have your contour lines decoded somehow into a memory structure, so to turn those into a SDK layer use the GM_CreateCustomVectorLayer function to create a new layer, then GM_AddLineToVectorLayer to add the lines to the new layer. Make sure to add an ELEVATION attribute to each line with the contour height.
Once you have that layer you can then grid it and export.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website