12-01-2009, 12:56 AM
Hi, i'm from Spain and i'm interested in this post. I have modified the TileCodeingScript.cs with the data that SantiagoBG contribute, but when
FSEarthTiles run send me a message error, and no conect with web server PNOA (Free Spanish Server).
You can help me ??
I think i dont know write the TileCodeing Script.cs.
This is my TileCodeingScript.cs : (copy/past entire file)
using System;
using System.Collections.Generic;
using System.Text;
using FSEarthTilesInternalDLL;
namespace FSEarthTilesDLL
{
public class TileCodeingScript
{
//The following Methodes will be called by FSEarthTiles:
//MapAreaCoordToTileCode(Int64 iAreaCodeX, Int64 iAreaCodeY, Int64 iAreaCodeLevel, String iUseCode)
public String MapAreaCoordToTileCode(Int64 iAreaCodeX, Int64 iAreaCodeY, Int64 iAreaCodeLevel, String iUseCode)
{
String vResultCode = "";
if (EarthCommon.StringCompare(iUseCode, "xyz")) // example Service 3 thank's to Steffen I.
{
}
else if (EarthCommon.StringCompare(iUseCode, "X1Y1X2Y2" ) ) // examples Services type NPOA (Spanish geografic institute) or
OpenLayers (Provided by MetaCarta, http://openlayers.org/)
{
Double vWestBorderLongitudeOfTile = EarthMath.GetAreaTileLeftLongitude (iAreaCodeX, iAreaCodeLevel);
Double vEastBorderLongitudeOfTile = EarthMath.GetAreaTileRightLongitude (iAreaCodeX, iAreaCodeLevel);
Double vNorthBorderLatitudeOfTile = EarthMath.GetAreaTileTopLatitude (iAreaCodeY, iAreaCodeLevel);
Double vSouthBorderLatitudeOfTile = EarthMath.GetAreaTileBottomLatitude (iAreaCodeY, iAreaCodeLevel);
vResultCode = vWestBorderLongitudeOfTile.ToString().Replace(",", "." ) + "," + vSouthBorderLatitudeOfTile.ToString().Replace
(",", "." ) + "," + vEastBorderLongitudeOfTile.ToString().Replace(",", "." ) + "," + vNorthBorderLatitudeOfTile.ToString().Replace(",", "." );
}
else // Quad mode, examples Services 1 and 2
{
Int64 vSteps = EarthMath.cLevel0CodeDeep - iAreaCodeLevel;
}
return vResultCode;
}
}
}
Post Edited ( 01-12-09 09:49 )
FSEarthTiles run send me a message error, and no conect with web server PNOA (Free Spanish Server).
You can help me ??
I think i dont know write the TileCodeing Script.cs.
This is my TileCodeingScript.cs : (copy/past entire file)
using System;
using System.Collections.Generic;
using System.Text;
using FSEarthTilesInternalDLL;
namespace FSEarthTilesDLL
{
public class TileCodeingScript
{
//The following Methodes will be called by FSEarthTiles:
//MapAreaCoordToTileCode(Int64 iAreaCodeX, Int64 iAreaCodeY, Int64 iAreaCodeLevel, String iUseCode)
public String MapAreaCoordToTileCode(Int64 iAreaCodeX, Int64 iAreaCodeY, Int64 iAreaCodeLevel, String iUseCode)
{
String vResultCode = "";
if (EarthCommon.StringCompare(iUseCode, "xyz")) // example Service 3 thank's to Steffen I.
{
}
else if (EarthCommon.StringCompare(iUseCode, "X1Y1X2Y2" ) ) // examples Services type NPOA (Spanish geografic institute) or
OpenLayers (Provided by MetaCarta, http://openlayers.org/)
{
Double vWestBorderLongitudeOfTile = EarthMath.GetAreaTileLeftLongitude (iAreaCodeX, iAreaCodeLevel);
Double vEastBorderLongitudeOfTile = EarthMath.GetAreaTileRightLongitude (iAreaCodeX, iAreaCodeLevel);
Double vNorthBorderLatitudeOfTile = EarthMath.GetAreaTileTopLatitude (iAreaCodeY, iAreaCodeLevel);
Double vSouthBorderLatitudeOfTile = EarthMath.GetAreaTileBottomLatitude (iAreaCodeY, iAreaCodeLevel);
vResultCode = vWestBorderLongitudeOfTile.ToString().Replace(",", "." ) + "," + vSouthBorderLatitudeOfTile.ToString().Replace
(",", "." ) + "," + vEastBorderLongitudeOfTile.ToString().Replace(",", "." ) + "," + vNorthBorderLatitudeOfTile.ToString().Replace(",", "." );
}
else // Quad mode, examples Services 1 and 2
{
Int64 vSteps = EarthMath.cLevel0CodeDeep - iAreaCodeLevel;
}
return vResultCode;
}
}
}
Post Edited ( 01-12-09 09:49 )