Controls like SpatialWiki

Nov 28, 2008 at 4:54 PM

Hi to DeepEarth developer's Team,

DeepEarth is a great development, congratulations. Do you take a look at http://spatialwiki.com/. I think that DeepEarth gives us the framwork to integrate these tools and user experience. Am I right? <o:p></o:p>

Finally, is there someone who accesses a WMS from DeepEarth? I want to mix VE tiles images with WMS and, eventually, shape edition as you can see in SpatialWiki. Here I see some topics on WMS, it talks about many tests but I found no code sample or success story. I understand that we need to make a WMS request for each Virtual Earth tile that are shown in the map, this gives us many round trip between DE and the WMS server. And if I execute a WMS request with the map extent and retreive only one image, should I need to seperate it into a number of tiles that match the VE tiles in the DeepEarth map control? I know nothing about DeepZoom, but does DeepZoom help me in the last case?

Thank you

 

Developer
Nov 29, 2008 at 12:37 AM
I have made a little class that calls a web service and pulls a list of GeoTagged Wiki articles for that area, is this kind of what you mean...? in relation to http://spatialwiki.com/
Coordinator
Nov 29, 2008 at 12:55 AM
Demal, the spatialwiki.com site is a showcase of IDV's commerical Silverlight application. IDV have been selling custom control build on VE for some time. That site I hope as been great for dogfooding their new control. I really hope they actually put in a visual search, at the moment its really just a version list of objects drawn on the map, good tech demo but I'm missing how it is actually useful. To be clear, they use Silverlight but are not using anything from this project, their control pre-dates this one.

We taking a very different approach here, we are creating a Silverlight control that is completely open, and can be configured with data of your choosing. We're using the DeepZoom MSI control from Silverlight that makes our control very small yet incredibly powerful. We have a bunch of work still to do, you;ve noticed we havn't yet put out a release but that will happen very soon. dotnetnoobie has started working on some support for WMS, its a complete topic on its own.

John.
Dec 1, 2008 at 2:47 PM

Hi to Soulsolutions and Dotnetdoobie,

Thanks for your reply. John, I understand the fundamental difference between DeepEarth and the IDV solutions. Thank you for the precision, I looked deeply in the DeepEarth code last week end, and now I see the technical differences between the IDV and DeepEarth. Excuse me for the confusion. I really appreciate DeepEarth, its an elegant solution, and I hope use it for the following purpose:

Context: I am a C# .NET 3.5 "geomatic coder" in my professionnal job. In my job, I use commercial solutions and open source solutions (MapServer, Proj.NET, SharpMap, and my own custom developments from the open source solutions, etc). I am also volunteer in a watershed management association (www.cobaric.qc.ca). My interest for DeepEarth is in this last context. We want to create a buisness system to manage our watershed data, we want to make online editing and we want to distribute those informations to our community.

1. Because we have a detailled basic topographic map for our watershed, I want to create a WMS service to display basic maps and add it as a layer in DeepEarth. John you told me that DotNetDoobie work on it, if I can contribute, let me know. But I don't think I will be a good helper at this time. I should confess that, as little as I understand, a Virtual Earth Tile Server seems to be very different than a Web Map Service and I know nothing about the first one... and I am new to Silverlight (but I work a lot with WPF on desktop solutions). Knowing that basic map doesn't change a lot during time, maybe I should create my own tile service instead of a WMS to display a basic map?! Do you have an advice on it.

2. When I will have a stable solution for display my basic map, I will add a web service for editing the geographic informations watershed's . Silverlight gives me everything I need to create a good online editing service  with a rich user experience.

As I said, DeepEarth appears to me as a good framework for Silverlight based development for web mapping solutions. I am impressed by your powerful tool. For the next month, I am gonna play with it. I will learn Silverlight, I will have a better knowledge of a "custom tile service" and I will gives you more feedback.

Alain

 

Developer
Dec 1, 2008 at 3:47 PM
I am really a novice at WMS, I only took the VE "TileLayer" and convert the "QuadKey" used by virtial earth tiles and convert it to make a BBox set of coors for a request to a WMS server.

it is actually not perfect I think or maybe be it is because of some difference in the dimensions/projection of the map used in WMS to Virtual earth, I am not sure...
but the WMS tilelayer in the project seems to change the shape of the map as you zoom in and out, better as you zoom in and then when you zoom right out the map seems to become a little "Stretched" north/south.
but if anyone wants to help try and figure/fix this issue would be great :)

there seems to be a lot of tools/servers applications on the web for WMS that you can download and setup your own WMS server.
Dec 1, 2008 at 6:33 PM

Hi,

That's interesting. I've found the source file that you use in the .../TileSource/WMS folder. I am new to the DeepEarth project. Before I contribute to it, I should have a better understanding of DeepEarth and read more about the VE tile on MSDN. I'll follow your progress with an svn synchro and I'll be back for contributing to the project when I'll be ready... But for your problem:

When you talk about a stretch from north/south, I immediatly think about projection problem. Remember that VE is based on a Universal Transverse Mercator projection. Maybe you know projection theory, so excuse me for the next explanation. In transforming the spheroid earth to a flat depiction, four characteristics can be distorted: angles, areas, distances, and directions. In a map projection, one of these can be preserved, but only one. The categorization of projections describes what the projection tries to preserve: equal-area, equidistant, conformal which preserves angles and thus shape over small areas, and what we call "compromise" which distort all four in an effort to create a map that "looks not so bad or right". In your code, I see that you ask for EPSG 4326 coordinate system (Am I right?). Data stored in geographic coordinates (EPSG 4326) are not in a map projection; rather it is a simple transformation from spherical coordinates to a Cartesian system that does not preserve any of the four components and have a typical stretch from north/south.

I hope this help...

Alain

Developer
Dec 2, 2008 at 2:36 AM
New to Version 6.15 are (among other things):
Added spherical Mercator coordinate operation method and associated CRS as seen in popular web mapping and visualisation applications.

added the spherical Mercator / Web Mercator projection used in Virtual Earth and Google Maps.
 
http://www.sharpgis.net/post/2008/05/SphericalWeb-Mercator-EPSG-code-3785.aspx

So now I am looking for a WMS server that has this so I can give it a test... EPSG:3785

from what i have read ESPG:3785 is actually a renamed version of ESPG:900913


I also made a second WMS TileLayer class today, but it has the same issues as before, but it is also using a ESPG:4326
I based it in this page from MSDN
http://msdn.microsoft.com/en-us/library/cc161076.aspx?ppud=4
Dec 2, 2008 at 7:35 PM
Hi dotnetnoobie,

I also read the MSDN page and I was thinking about solutions. I just open the live example of the protype control and I found that the WMS page works better, what do you change???

Alain
Developer
Dec 3, 2008 at 2:05 AM
I have not made any changes to the project, it is the same as before

I did make another WMS tilelayer class using the info from the MSDN link, but i have not uploaded it to the codeplex site,
but it also had the same issues as the first one, but is properly a little easier to understand and less code involved

by the "Live" site do you mean "http://deepearth.soulsolutions.com.au/" ?
Developer
Dec 3, 2008 at 2:49 AM
I found this bit of code... http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Layer/SphericalMercator.js#L80

it has a couple methods to convers a ESPG:4326 Lon & Lat to a "SphericalMercator" point

I tried to implement the methods into the the WMS tilelayer class, but it just got funny results, I used the ConvertToMercator method

 

private Point ConvertToMercator(double lon, double lat)
{
    var x = lon * 20037508.34 / 180;
    var y = Math.Log(Math.Tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
    y = y * 20037508.34 / 180;
    return new Point(x, y);
}

 

 

private Point InverseMercator(double x, double y)
{
    var lon = (x / 20037508.34) * 180;
    var lat = (y / 20037508.34) * 180;
    lat = 180 /
Math.PI * (2 * Math.Atan(Math.Exp(lat * Math.PI / 180)) - Math.PI / 2);
    return new Point(lon, lat);
}

 

I assume that the number 20037508.34 = the DeepEarth.Constants.OffsetMeters, not sure..?
Developer
Dec 3, 2008 at 4:23 AM
http://www.sharpgis.net/post/2007/07/27/The-Microsoft-Live-Maps-and-Google-Maps-projection.aspx

http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/

some good links explaining it all quite nicely
Dec 3, 2008 at 5:37 PM

First, I finally understand that the WMS page works better because the display shows continuous ZoomLevel changes.

Second, I write some wrong informations about the stretch of the EPSG:4326 (my natural language is French), it is compressed instead of stretched. This is because the projection maps meridians to equally spaced vertical straight lines, and parallels to equally spaced horizontal straight lines. It is called equidistant cylindrical projection, geographic projection or, in french: "platte carre".

Third, Last days, I was in a rush on a project and I explore DeepEarth on my part time. I read to fast the MSDN Virtual Earth documentation. I read Mercator but my mind catch UTM (I should be an autistic guy ;-) ). I lost a lot of test coding time (but I have a better understanding of the DeepEarth code...). Interactive web maps (Virtual Earth, Google Maps, OSM) are using "Spherical Mercator" system and this is a Mercator projection on the sphere instead of WGS84 ellipsoid. If I finally understand, the Spherical Mercator is defined as EPSG:900913 or EPSG:3785. You know, I am a Ph D = Permanent Head Damage...