Skip to content

Commit

Permalink
Merge pull request #55 from dem-net/dev
Browse files Browse the repository at this point in the history
0.1.4 token check for samples
  • Loading branch information
xfischer authored Jul 1, 2019
2 parents b43ee53 + e3c736a commit 8d32d6c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
8 changes: 4 additions & 4 deletions DEM.Net.Core/DEM.Net.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<PackageId>DEM.Net.Core</PackageId>
<Version>0.1.3</Version>
<Version>0.1.4</Version>
<Authors>Xavier Fischer, Frédéric Aubin</Authors>
<Copyright>Xavier Fischer, Frédéric Aubin</Copyright>
<Owners>Xavier Fischer</Owners>
<PackageProjectUrl>https://github.com/dem-net/DEM.Net</PackageProjectUrl>
<PackageReleaseNotes>bug fix for DP reduction with ?? operator</PackageReleaseNotes>
<PackageReleaseNotes>Get config Tokens</PackageReleaseNotes>
<PackageTags>DEM, Terrain, Elevation</PackageTags>
<Title>DEM.Net</Title>
<Product>DEM.Net</Product>
Expand All @@ -18,8 +18,8 @@
<RepositoryType>GitHub</RepositoryType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIconUrl>https://raw.githubusercontent.com/dem-net/Resources/master/images/DEMnet_512.png</PackageIconUrl>
<AssemblyVersion>0.1.3.0</AssemblyVersion>
<FileVersion>0.1.3.0</FileVersion>
<AssemblyVersion>0.1.4.0</AssemblyVersion>
<FileVersion>0.1.4.0</FileVersion>
</PropertyGroup>

<!-- Build package only in Release -->
Expand Down
2 changes: 2 additions & 0 deletions DEM.Net.Core/Services/Imagery/IImageryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ public interface IImageryService
TileRange DownloadTiles(BoundingBox bbox, ImageryProvider provider, int minTilesPerImage = 4);
TextureInfo GenerateNormalMap(HeightMap heightMap, string outputDirectory);

Dictionary<string, string> GetConfiguredTokens();

}
}
18 changes: 16 additions & 2 deletions DEM.Net.Core/Services/Imagery/ImageryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,22 @@ public Uri BuildUri(ImageryProvider provider, int x, int y, int zoom)
return new Uri(url, UriKind.Absolute);
}


public Dictionary<string, string> GetConfiguredTokens()
{
#if NETFULL
Dictionary<string, string> tokens = new Dictionary<string, string>();
foreach (var key in ConfigurationManager.AppSettings.AllKeys)
{
tokens[key] = ConfigurationManager.AppSettings[key];
}
return tokens;
#else

return _config.GetSection("Tokens").GetChildren().ToDictionary(c => c.Key, c => c.Value);
#endif
}

#endregion

#region Normal map generation
Expand Down Expand Up @@ -432,7 +448,6 @@ private Color FromVec3NormalToColor(Vector3 normal)

#endregion

#region UV mapping

public List<Vector2> ComputeUVMap(HeightMap heightMap, TextureInfo textureInfo)
{
Expand Down Expand Up @@ -463,7 +478,6 @@ public List<Vector2> ComputeUVMap(HeightMap heightMap, TextureInfo textureInfo)
return uvs;
}

#endregion


}
Expand Down
6 changes: 3 additions & 3 deletions DEM.Net.glTF/DEM.Net.glTF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<PackageId>DEM.Net.glTF</PackageId>
<Version>0.1.3</Version>
<Version>0.1.4</Version>
<Authors>Xavier Fischer</Authors>
<Copyright>Xavier Fischer</Copyright>
<Owners>Xavier Fischer</Owners>
<PackageProjectUrl>https://github.com/dem-net/DEM.Net.glTF</PackageProjectUrl>
<PackageReleaseNotes>bug fix for DP reduction with ?? operator</PackageReleaseNotes>
<PackageReleaseNotes>Get config tokens</PackageReleaseNotes>
<PackageTags>DEM, Terrain, Elevation, Mesh, 3D, glTF, Map, STL</PackageTags>
<Title>DEM.Net</Title>
<Product>DEM.Net</Product>
Expand All @@ -18,7 +18,7 @@
<RepositoryType>GitHub</RepositoryType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIconUrl>https://raw.githubusercontent.com/dem-net/Resources/master/images/DEMnet_512.png</PackageIconUrl>
<AssemblyVersion>0.1.3.0</AssemblyVersion>
<AssemblyVersion>0.1.4.0</AssemblyVersion>
</PropertyGroup>

<!-- Build package only in Release -->
Expand Down

0 comments on commit 8d32d6c

Please sign in to comment.