|  Home  |  Map Suite  |  Cygnus Track
    LivePerson Chat

ThinkGeo Blog

Providing GIS and GPS tracking insight.

 Thursday, June 19, 2008

Today one of my colleagues, Val Guillou, released a very interesting white paper titled How to use GRID with Map Suite.  I have seen GRID before, but never realized all of the analysis you can do with GRID until I read Val's white paper.

In case you aren't familiar with GRID, it's a really neat way of taking point data readings and interpolating them to produce an attractive visual representation of the data.  The map image below represents farmland, and shows the soil quality based upon two separate point data values (pH & Magnesium).  The map below was created using GRID and IDW interpolation, however, you're free to implement virtually any interpolation algorithms with GRID.  This opens the door for you to create some really cool maps.

Sample Application Screenshot

As I think about various ways to use GRID technology in conjunction with GIS and mapping, several applications come to mind.  To name just a few examples: temperature maps, price maps and production maps could all be enhanced with the use of GRID.  I'm anxious to hear what other applications you think GRID would be a good fit for, so feel free to leave comments below. 

Technorati Tags: , ,

Comments [0] - Trackback Posted June 19, 2008 at 10:57 AM by Clint Batman   #   
Topics: General | Map Suite Desktop | Map Suite Engine | Map Suite Web
 Friday, May 23, 2008

Today, I released a new white paper and online sample application that shows how to build a custom zoom bar in a web application using the Map Suite Web Edition.   This question of a zoom bar comes up a lot with our users, so I thought it would be beneficial to put together a simple sample application and show how to hook it all together using the built-in AJAX functionality of the ASP.NET map control.  Although this example was based on the Map Suite Web Edition, the same concepts apply for implementing a custom zoom bar in the Map Suite Desktop Edition.

Below is a screen shot of what the sample application looks like; it's pretty simple but provides a great start if you want to build your own zoom bar.  Also, if you have any topics that you would like to see in a white paper, please feel free to add your suggestions to this blog entry.

Comments [0] - Trackback Posted May 23, 2008 at 10:49 AM by Clint Batman   #   
Topics: Map Suite Web
 Tuesday, March 04, 2008

Recently I have received several questions about how to retrieve the current zoom level that is applied on the map control.  This information comes in handy when you want to implement a zoom bar or debug rendering code at a specific zoom level.  

To accomplish this, I have provided a function below that checks the current scale of the map against each zoom level's UpperExtent value.  With this code example, I assume that you are using the pre-built zoom levels off of the layer object that were introduced in version 2.39.0 or later of Map Suite and you have at least one layer loaded.   If you don't have any layers loaded, you could switch out the map1.Layers(0) with map1.DynamicLayers(0) and the function should still work properly.  To try this function out for yourself, just call it in the Map1_AfterMapDraw Event.

  'GET ZOOM LEVEL FUNCTION

  Private Function GetZoomLevel(ByRef Map As Map) As String
        Dim ZoomLevel As String = 0
        Dim CurrentScale As Double = map1.CurrentScale
        If CurrentScale < map1.Layers(0).ZoomLevel18.UpperExtent Then ZoomLevel = 18
        If CurrentScale < map1.Layers(0).ZoomLevel17.UpperExtent Then ZoomLevel = 17
        If CurrentScale < map1.Layers(0).ZoomLevel16.UpperExtent Then ZoomLevel = 16
        If CurrentScale < map1.Layers(0).ZoomLevel15.UpperExtent Then ZoomLevel = 15
        If CurrentScale < map1.Layers(0).ZoomLevel14.UpperExtent Then ZoomLevel = 14
        If CurrentScale < map1.Layers(0).ZoomLevel13.UpperExtent Then ZoomLevel = 13
        If CurrentScale < map1.Layers(0).ZoomLevel12.UpperExtent Then ZoomLevel = 12
        If CurrentScale < map1.Layers(0).ZoomLevel11.UpperExtent Then ZoomLevel = 11
        If CurrentScale < map1.Layers(0).ZoomLevel10.UpperExtent Then ZoomLevel = 10
        If CurrentScale < map1.Layers(0).ZoomLevel09.UpperExtent Then ZoomLevel = 9
        If CurrentScale < map1.Layers(0).ZoomLevel08.UpperExtent Then ZoomLevel = 8
        If CurrentScale < map1.Layers(0).ZoomLevel07.UpperExtent Then ZoomLevel = 7
        If CurrentScale < map1.Layers(0).ZoomLevel06.UpperExtent Then ZoomLevel = 6
        If CurrentScale < map1.Layers(0).ZoomLevel05.UpperExtent Then ZoomLevel = 5
        If CurrentScale < map1.Layers(0).ZoomLevel04.UpperExtent Then ZoomLevel = 4
        If CurrentScale < map1.Layers(0).ZoomLevel03.UpperExtent Then ZoomLevel = 3
        If CurrentScale < map1.Layers(0).ZoomLevel02.UpperExtent Then ZoomLevel = 2
        If CurrentScale < map1.Layers(0).ZoomLevel01.UpperExtent Then ZoomLevel = 1
        Return ZoomLevel
    End Function

If you are using an older version of Map Suite, or use Thresholds instead of the built in Zoom Levels, the same theory still applies.  However, instead of using current scale you would most likely use the map1.CurrenExtent.Width property and compare that against each Threshold's UpperLimit value. One additional thing to consider in this scenario is to make sure your ThresholdUnit and MapUnit are the same, otherwise you will need to convert them to make an accurate comparison.

Comments [0] - Trackback Posted March 4, 2008 at 5:35 PM by Clint Batman   #   
Topics: Map Suite Desktop | Map Suite Engine | Map Suite Web
 Monday, February 25, 2008

Map Suite has the ability to edit existing shapefiles, but what if you want to create your own?

The code below should get you started, but if you want to explore more shapefile editing check out our EditShapeFile sample application included with the evaluation download.


Below is a very simple example of creating a point based shapefile from scratch. It adds three records and fills the value for the field “Name”.

 

C# 

Private DatabaseColumns Columns = new DatabaseColumns();

private DatabaseColumn Column1;

Column1.FieldType = FieldDataType.fdtString;
Column1.Length = 15;

Column1.DecimalLength = 0;

Column1.Name = "Name";

Columns.Add(Column1);

Map1.CreateNewShapefile(ShapeTypeEnum.Point, "C:\\thinkgeo\\temp", "Test", Columns);

Layer Layer = new Layer("C:\\thinkgeo\\temp\\test.shp", false);

Layer.BeginEdit();

int Shape1 = Layer.AddShape(new PointShape(-98, 19));

Layer.UpdateTableData(1, "Name", "Record1");

int Shape2 = Layer.AddShape(new PointShape(-97, 15));

Layer.UpdateTableData(2, "Name", "Record2");

int Shape3 = Layer.AddShape(new PointShape(-98, 20));

Layer.UpdateTableData(3, "Name", "Record3");

Layer.CommitEdit();

 

 

 

VB.NET

Dim Columns As New DatabaseColumns

Dim Column1 As DatabaseColumn

Column1.FieldType = FieldDataType.fdtString

Column1.Length = 10

Column1.DecimalLength = 0

Column1.Name = "Name"

Columns.Add(Column1)

 

Dim Column2 As DatabaseColumn

Column2.FieldType = FieldDataType.fdtDouble

Column2.Length = 5

Column2.DecimalLength = 2

Column2.Name = "Acres"

Columns.Add(Column2)

Dim strPath As String = "C:\Projects\ThinkGeo\"

Dim strName As String = "Steve"

Map1.CreateNewShapefile(ShapeTypeEnum.Polygon, strPath, strName, Columns)

 

Map1.MapUnit = MapSuite.Geometry.MapLengthUnits.DecimalDegrees

 

Dim Layer As New Layer(strPath & strName, False)

Layer.BeginEdit()

Dim Shape As New Polygon()

Dim dblacres As Double = 90.31

Dim shape1 As Integer = Layer.AddShape(Shape)

 

Layer.UpdateTableData(shape1, "Acres", dblacres.ToString)

Layer.UpdateTableData(shape1, "Name", "Record1")

Layer.CommitEdit()

Layer.BuildIndex()
Layer.BuildRecID("Recid", True)

 

Comments [0] - Trackback Posted February 25, 2008 at 5:34 PM by Ryan Desemo   #   
Topics: Map Suite Desktop | Map Suite Engine | Map Suite Web
 Monday, February 18, 2008

Over the years it has sometimes been difficult to visually show customers how our products can fit together to build various types of .NET applications.  Since Map Suite can support several .NET application types including Pocket PC, Desktop, Web, Web Services, Windows Services and console applications, a lot of times it's not clear which Map Suite product is best suited for the task.  Enlisting the help of our very talented graphic designer, we now have a Map Suite product relationship diagram that visually shows how the different Map Suite products can fit together to build various types of .NET applications.

Now I know what they mean when they say a picture is worth a 1000 words!

Comments [0] - Trackback Posted February 18, 2008 at 5:07 PM by Clint Batman   #   
Topics: General | Map Suite Desktop | Map Suite Engine | Map Suite Web
 Tuesday, February 12, 2008

Over the past few months I have been working more and more with WMS Web Services.  WMS stands for Web Map Service and is an open standard set by the Open Geospatial Consortium this standard was designed so heterogeneous map data sources can be shared remotely via an Internet connection. 

In my exploration of WMS over the past few months I have found several free WMS web services that can provide valuable mapping data to your application.  My top 3 favorite WMS Web Services include:

1. National NEXRAD Radar Imagery

WMS URL:  http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi

Layer Name: nexrad-n0r-m45m

Description:  Provides updates of the National NEXRAD Base Reflectivity Radar sites very 45 minutes.

 

2. USGS Topo Maps from TerraServer

WMS URL: http://terraserver-usa.com/ogccapabilities.ashx

Layer Name: DOQ

Description: These are handy Topo maps from the USGS.

3.  Landsat Imagery from NASA

WMS URL: http://onearth.jpl.nasa.gov/wms.cgi

Layer Name: global_mosaic

Description:  Provides an easy way to add NASA Landsat imagery to your application. 

In case you want to consume these web services inside of an application using our Map Suite .NET controls I have provided some sample code below:

        If Not Page.IsPostBack Then
            Map1.MapUnit = MapLengthUnits.DecimalDegrees

            Dim StateLayer As New MapSuite.Layer(Server.MapPath("") + "\SampleData\STATES.shp", True)
            StateLayer.ZoomLevel01.GeoStyle = GeoAreaStyles.GetSimpleAreaStyle(MapSuite.GeoColor.KnownColors.Transparent, MapSuite.GeoColor.KnownColors.Black)
            StateLayer.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.ZoomLevel18

            Map1.Layers.Add(StateLayer)

            Dim wmsUrl As String = "http://onearth.jpl.nasa.gov/wms.cgi"
            Dim myLayer1 As New WmsLayer("Global", wmsUrl)
            myLayer1.AddLayer("global_mosaic")
            myLayer1.AddStyle("visual")
            myLayer1.Active = True
            myLayer1.SetImageFormat("image/png")
            myLayer1.SRCSystem = "EPSG:4326"
            myLayer1.TimeOutInSeconds = 15

            Map1.WmsLayers.Add(myLayer1)

            Map1.CurrentExtent = New RectangleR(-177.42, 99.53, 71.78, -77.56)
        End If

Technorati Tags: , ,

 

Comments [2] - Trackback Posted February 12, 2008 at 12:26 PM by Clint Batman   #   
Topics: Map Suite Desktop | Map Suite Engine | Map Suite Web
 Friday, February 08, 2008

Today I released a new white paper and code explaining how to build scalable GIS applications with web services.  The paper gives sample code for both the web service and the client application using Map Suite Web & Engine Editions.  In this case the client application was a web application, but the same concepts can be used to consume the web service in a desktop application.  This type of application architecture works really well for both scalability and allowing you centralize the large base map datasets.

Below is a screen shot of what the result of the sample client application look like.  We even used the new Map Suite Icon library for the customer icons :)

Sample Application Screenshot

Technorati Tags: , ,

Comments [0] - Trackback Posted February 8, 2008 at 2:12 PM by Clint Batman   #   
Topics: General | Map Suite Desktop | Map Suite Engine | Map Suite Web
Archive
<July 2008>
SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789
Statistics
Total Posts: 11
This Year: 11
This Month: 0
This Week: 0
Comments: 4
Administration
Sign In