removido arquivos antigos
28
API/app.py
|
|
@ -1,28 +0,0 @@
|
|||
from flask import Flask, request, jsonify
|
||||
from flask_cors import CORS
|
||||
|
||||
app = Flask(__name__)
|
||||
CORS(app) # Isso habilita o CORS para todas as rotas e origens
|
||||
|
||||
coordenadas = {}
|
||||
|
||||
@app.route('/receber-coordenadas', methods=['POST'])
|
||||
def receber_coordenadas():
|
||||
dados = request.json
|
||||
id = dados.get('id')
|
||||
lat = dados.get('latitude')
|
||||
lon = dados.get('longitude')
|
||||
|
||||
coordenadas[id] = {'latitude': lat, 'longitude': lon}
|
||||
|
||||
return jsonify({'status': 'Coordenadas recebidas com sucesso!'})
|
||||
|
||||
@app.route('/servir-coordenadas/<id>', methods=['GET'])
|
||||
def servir_coordenadas(id):
|
||||
if id in coordenadas:
|
||||
return jsonify(coordenadas[id])
|
||||
else:
|
||||
return jsonify({'error': 'Coordenadas não encontradas!'}), 404
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', port=5001, debug=True)
|
||||
|
Before Width: | Height: | Size: 289 KiB |
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
*_out.*
|
||||
Debug
|
||||
_out.*
|
||||
/Examples/packages
|
||||
|
||||
.vs
|
||||
Examples/*/bin
|
||||
Examples/*/obj
|
||||
*.user
|
||||
|
|
@ -1,363 +0,0 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Oo]ut/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<Application x:Class="Geo.Layer.Weather.Viewer.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Geo.Layer.Weather.Viewer"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Geo.Layer.Weather.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Photos\20230402_162019.jpg" />
|
||||
<None Remove="Photos\20230402_162253_best.jpg" />
|
||||
<None Remove="Photos\20230402_162438.jpg" />
|
||||
<None Remove="Photos\20230402_162901.jpg" />
|
||||
<None Remove="Photos\20230402_163412.jpg" />
|
||||
<None Remove="Photos\20230402_164044_best.jpg" />
|
||||
<None Remove="Photos\20230402_164454.jpg" />
|
||||
<None Remove="Photos\20230402_164728.jpg" />
|
||||
<None Remove="Photos\20230402_165350.jpg" />
|
||||
<None Remove="Photos\20230402_165817_best.jpg" />
|
||||
<None Remove="Photos\20230402_170347.jpg" />
|
||||
<None Remove="Photos\20230402_170529.jpg" />
|
||||
<None Remove="Photos\20230402_170721.jpg" />
|
||||
<None Remove="Photos\20230402_171432.jpg" />
|
||||
<None Remove="ReadMe-Ru.md" />
|
||||
<None Remove="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Photos\20230402_162019.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_162253_best.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_162438.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_162901.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_163412.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_164044_best.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_164454.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_164728.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_165350.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_165817_best.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_170347.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_170529.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_170721.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Photos\20230402_171432.jpg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ReadMe-Ru.md" />
|
||||
<EmbeddedResource Include="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspose.GIS" Version="23.8.0" />
|
||||
<PackageReference Include="ExifLib.Standard" Version="1.7.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using System;
|
||||
using Aspose.Gis.Geometries;
|
||||
|
||||
|
||||
namespace Geo.Advanced.Viewer.Logic
|
||||
{
|
||||
public class PhotoModel
|
||||
{
|
||||
public const string Regular = "Regular";
|
||||
public const string Marked = "Marked";
|
||||
public DateTime? Created { get; set; }
|
||||
public IPoint? Coordinate { get; set; }
|
||||
public string Mark { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using ExifLib;
|
||||
using Aspose.Gis.Geometries;
|
||||
|
||||
namespace Geo.Advanced.Viewer.Logic
|
||||
{
|
||||
public class PhotoStorage
|
||||
{
|
||||
public List<PhotoModel> LoadPhotos()
|
||||
{
|
||||
List<PhotoModel> photoList = new List<PhotoModel>();
|
||||
|
||||
var photoFiles = Directory.GetFiles(@"Photos");
|
||||
foreach (var file in photoFiles)
|
||||
{
|
||||
var info = new PhotoModel();
|
||||
|
||||
using (ExifReader reader = new ExifReader(file))
|
||||
{
|
||||
if (reader.GetTagValue<DateTime>(ExifTags.DateTimeDigitized, out var dateTimeDigitized))
|
||||
{
|
||||
info.Created = dateTimeDigitized;
|
||||
}
|
||||
|
||||
if (reader.GetTagValue<double[]>(ExifTags.GPSLatitude, out var lat) &&
|
||||
reader.GetTagValue<double[]>(ExifTags.GPSLongitude, out var lon))
|
||||
{
|
||||
var latDidgit = lat[0] + lat[1] / 60.0 + lat[2] / 3600.0;
|
||||
var lonDidgit = lon[0] + lon[1] / 60.0 + lon[2] / 3600.0;
|
||||
info.Coordinate = new Point(lonDidgit, latDidgit);
|
||||
}
|
||||
}
|
||||
|
||||
info.Mark = file.Contains("best") ? PhotoModel.Marked : PhotoModel.Regular;
|
||||
|
||||
photoList.Add(info);
|
||||
}
|
||||
photoList.Sort((x, y) => x.Created.Value.CompareTo(y.Created.Value));
|
||||
return photoList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
using Aspose.Gis.Rendering;
|
||||
using Aspose.Gis.Rendering.Symbolizers;
|
||||
|
||||
namespace Geo.Advanced.Viewer.Logic
|
||||
{
|
||||
public class StyleBuilder
|
||||
{
|
||||
public static SimpleLine CreateWayStyle()
|
||||
{
|
||||
return new SimpleLine()
|
||||
{
|
||||
Color = System.Drawing.Color.Peru,
|
||||
Style = StrokeStyle.Dash,
|
||||
Width = 3,
|
||||
};
|
||||
}
|
||||
|
||||
public static SimpleMarker CreatePlaceStyle()
|
||||
{
|
||||
return new SimpleMarker()
|
||||
{
|
||||
Size = 10,
|
||||
StrokeWidth = 0,
|
||||
FillColor = System.Drawing.Color.Maroon,
|
||||
FeatureBasedConfiguration = (feature, symbolizer) =>
|
||||
{
|
||||
var isMark = feature.GetValue<string>(nameof(PhotoModel.Mark));
|
||||
if (isMark == PhotoModel.Marked)
|
||||
{
|
||||
symbolizer.FillColor = System.Drawing.Color.Red;
|
||||
symbolizer.Size = symbolizer.Size * 2;
|
||||
symbolizer.ShapeType = MarkerShapeType.Star;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<Window x:Class="Geo.Advanced.Viewer.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Geo.Advanced.Viewer"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<Grid x:Name="myGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10px"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="50px"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Image x:Name="LayerContainer" Grid.Column="0" Grid.Row="1"/>
|
||||
<Button Grid.Column="1" Grid.Row="2" Content="Show" Click="Show_Click" />
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Aspose.Gis;
|
||||
using System.Linq;
|
||||
|
||||
namespace Geo.Advanced.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
Show_Click(null!, null!);
|
||||
}
|
||||
|
||||
ProjectPresenter _projectPresenter = new();
|
||||
|
||||
private void Show_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var (placeLayer, mapStream) = _projectPresenter.CreateMap();
|
||||
|
||||
DrawAttributes(placeLayer);
|
||||
DrawMap(mapStream);
|
||||
}
|
||||
private void DrawMap(Stream mapStream)
|
||||
{
|
||||
Image finalImage = (Image)myGrid.FindName("LayerContainer");
|
||||
BitmapImage logo = new BitmapImage();
|
||||
logo.BeginInit(); logo.StreamSource = mapStream;
|
||||
logo.EndInit(); finalImage.Source = logo;
|
||||
}
|
||||
|
||||
private void DrawAttributes(VectorLayer placeLayer)
|
||||
{
|
||||
ListBox listBox = new ListBox();
|
||||
listBox.SelectionMode = SelectionMode.Single;
|
||||
|
||||
var headers = placeLayer.Attributes.Select(t => t.Name);
|
||||
|
||||
listBox.Items.Add(new ListBoxItem()
|
||||
{
|
||||
Content = string.Join(", ", headers),
|
||||
Background = new SolidColorBrush(Color.FromRgb((byte)217, (byte)217, (byte)214))
|
||||
});
|
||||
|
||||
foreach (var feature in placeLayer)
|
||||
{
|
||||
var dump = feature.GetValuesDump();
|
||||
listBox.Items.Add(new ListBoxItem()
|
||||
{
|
||||
Content = string.Join(", ", dump),
|
||||
Background = new SolidColorBrush(Color.FromRgb((byte)217, (byte)217, (byte)214))
|
||||
});
|
||||
}
|
||||
|
||||
Grid.SetRow(listBox, 1);
|
||||
Grid.SetColumn(listBox, 1);
|
||||
|
||||
myGrid.Children.Add(listBox);
|
||||
Content = myGrid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
|
@ -1,20 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Geo.Advanced.Viewer
|
||||
{
|
||||
public class ProjectInfo
|
||||
{
|
||||
public string Description => new StreamReader(Assembly.GetExecutingAssembly()
|
||||
.GetManifestResourceStream("Geo.Advanced.Viewer.ReadMe.md")!).ReadToEnd();
|
||||
|
||||
public string Title { get; } = "Advanced Viewer";
|
||||
|
||||
public void Run()
|
||||
{
|
||||
var newForm = new MainWindow();
|
||||
newForm.Title = Title;
|
||||
newForm.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using Aspose.Gis;
|
||||
using Aspose.Gis.Rendering;
|
||||
using Aspose.Gis.SpatialReferencing;
|
||||
using Aspose.Gis.GeoTools.LayersMap;
|
||||
using Aspose.Gis.Rendering.Labelings;
|
||||
using Aspose.Gis.Geometries;
|
||||
using Aspose.Gis.GeoTools.Extensions;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Geo.Advanced.Viewer.Logic;
|
||||
|
||||
namespace Geo.Advanced.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Manages operations required to display layers in different forms and styles.
|
||||
/// </summary>
|
||||
internal class ProjectPresenter
|
||||
{
|
||||
public (VectorLayer placeLayer, MemoryStream mapFileName) CreateMap()
|
||||
{
|
||||
var storage = new PhotoStorage();
|
||||
var photoList = storage.LoadPhotos();
|
||||
|
||||
var placeLayer = CreatePlacesLayer(photoList);
|
||||
var wayLayer = CreateWayLayer(photoList);
|
||||
var mapStream = CreateMap(placeLayer, wayLayer);
|
||||
|
||||
return (placeLayer, mapStream);
|
||||
}
|
||||
|
||||
private static MemoryStream CreateMap(VectorLayer placesLayer, VectorLayer wayLayer, int mapSize = 512)
|
||||
{
|
||||
string tilesUrl = "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
|
||||
|
||||
var opt = new MapOptions();
|
||||
opt.SpatialReference = SpatialReferenceSystem.WebMercator;
|
||||
opt.Renderer = Renderers.Png;
|
||||
opt.SizeMode = MapSizeModes.Auto;
|
||||
opt.Width = mapSize;
|
||||
opt.Height = mapSize;
|
||||
opt.Layers = new MapLayerOptions[]
|
||||
{
|
||||
new MapLayerOptions() { Layer = wayLayer, Symbolyzer = StyleBuilder.CreateWayStyle(), Labeling = Labeling.Null, LayerSpatialRefSys = SpatialReferenceSystem.Wgs84 },
|
||||
new MapLayerOptions() { Layer = placesLayer, Symbolyzer = StyleBuilder.CreatePlaceStyle(), Labeling = Labeling.Null, LayerSpatialRefSys = SpatialReferenceSystem.Wgs84 }
|
||||
};
|
||||
opt.Tiles = new MapTilesOptions() { Url = tilesUrl, Level = 13 };
|
||||
|
||||
return LayersMapBuilder.CreateMap(opt);
|
||||
}
|
||||
|
||||
private static VectorLayer CreateWayLayer(List<PhotoModel> photoList)
|
||||
{
|
||||
var way = new LineString(photoList.Select(t => t.Coordinate));
|
||||
var wayHolder = new List<GeoHolder>() { new GeoHolder() { Coordinate = way } };
|
||||
var wayLayer = Drivers.InMemory.CreateLayer();
|
||||
wayLayer.AddFeatures(wayHolder);
|
||||
|
||||
return wayLayer;
|
||||
}
|
||||
|
||||
private static VectorLayer CreatePlacesLayer(List<PhotoModel> photoList)
|
||||
{
|
||||
var placeLayer = Drivers.InMemory.CreateLayer();
|
||||
placeLayer.AddFeatures(photoList);
|
||||
|
||||
return placeLayer;
|
||||
}
|
||||
|
||||
private class GeoHolder
|
||||
{
|
||||
public Geometry Coordinate { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
# Advanced Viewer
|
||||
|
||||
Этот код загружает список географических фотографий (GeoPhoto) из определенного каталога "Photoes".
|
||||
|
||||
Он просматривает каждый файл в каталоге и извлекает данные о дате, когда была сделана фотография, и GPS-координатах.
|
||||
|
||||
Если доступны географические координаты широты и долготы, они преобразуются в десятичные градусы и сохраняются в геофотообъекте в виде точки в системе отсчета координат Wgs84.
|
||||
|
||||
Список полученных координат отображается на карте.
|
||||
|
||||
Программа также загружает плитки в качестве подложки для карты.
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
# Advanced Viewer
|
||||
|
||||
This code loads a list of geographic photos (GeoPhoto) from a specific directory "Photos".
|
||||
|
||||
It goes through each file in the directory and extracts data about the date the photo was taken and GPS coordinates.
|
||||
|
||||
If geographic latitude and longitude coordinates are available, they are converted to decimal degrees and stored in the GeoPhoto object as a point with the Wgs84 coordinate reference system.
|
||||
|
||||
The list of received coordinates is displayed on the map.
|
||||
|
||||
The program also loads tiles as a substrate for the map.
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<Application x:Class="Geo.Coordinates.Convert.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Geo.Coordinates.Convert"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Geo.Coordinates.Convert
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ReadMe-Ru.md" />
|
||||
<None Remove="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ReadMe-Ru.md" />
|
||||
<EmbeddedResource Include="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspose.GIS" Version="23.8.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<Window x:Class="Geo.Coordinates.Convert.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Geo.Coordinates.Convert"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<DockPanel x:Name="MyPanel">
|
||||
<Border DockPanel.Dock="Top">
|
||||
<TextBlock/>
|
||||
</Border>
|
||||
<Border Background="Blue" DockPanel.Dock="Bottom" Height="100">
|
||||
<Button Content="Convert" Click="LaunchButton_Click" FontSize="18px" />
|
||||
</Border>
|
||||
<Border Background="WhiteSmoke" >
|
||||
<TextBox x:Name="pOutput" HorizontalAlignment="Left" IsReadOnly="True"
|
||||
TextWrapping="Wrap" Background="Transparent"
|
||||
BorderThickness="0" Margin="10" />
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
using Aspose.Gis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Geo.Coordinates.Convert
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private ProjectPresenter _projectPresenter = new();
|
||||
|
||||
private void LaunchButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var report = _projectPresenter.ConverAndReport();
|
||||
pOutput.Text = report.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Geo.Coordinates.Convert
|
||||
{
|
||||
public class ProjectInfo
|
||||
{
|
||||
public string Description => new StreamReader(Assembly.GetExecutingAssembly()
|
||||
.GetManifestResourceStream("Geo.Coordinates.Convert.ReadMe.md")!).ReadToEnd();
|
||||
|
||||
public string Title { get; } = "Coordinates Conversion";
|
||||
|
||||
public void Run()
|
||||
{
|
||||
var newForm = new MainWindow();
|
||||
newForm.Title = Title;
|
||||
newForm.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
using Aspose.Gis;
|
||||
using System.Text;
|
||||
|
||||
namespace Geo.Coordinates.Convert
|
||||
{
|
||||
internal class ProjectPresenter
|
||||
{
|
||||
public string ConverAndReport()
|
||||
{
|
||||
var output = new StringBuilder();
|
||||
output.AppendLine("START").AppendLine();
|
||||
|
||||
var decimalDegrees = GeoConvert.AsPointText(25.5, 45.5, PointFormats.DecimalDegrees);
|
||||
output.Append("DG: ").AppendLine(decimalDegrees);
|
||||
|
||||
var degreeDecimalMinutes = GeoConvert.AsPointText(25.5, 45.5, PointFormats.DegreeDecimalMinutes);
|
||||
output.Append("DDM: ").AppendLine(degreeDecimalMinutes);
|
||||
|
||||
var degreeMinutesSeconds = GeoConvert.AsPointText(25.5, 45.5, PointFormats.DegreeMinutesSeconds);
|
||||
output.Append("DMS: ").AppendLine(degreeMinutesSeconds);
|
||||
|
||||
var geoRef = GeoConvert.AsPointText(25.5, 45.5, PointFormats.GeoRef);
|
||||
output.Append("GeoRef: ").AppendLine(geoRef);
|
||||
|
||||
var mgrs = GeoConvert.AsPointText(25.5, 45.5, PointFormats.Mgrs);
|
||||
output.Append("Mgrs: ").AppendLine(mgrs);
|
||||
|
||||
var usng = GeoConvert.AsPointText(25.5, 45.5, PointFormats.Usng);
|
||||
output.Append("Usng: ").AppendLine(usng);
|
||||
|
||||
output.AppendLine();
|
||||
output.AppendLine("OK");
|
||||
|
||||
return output.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
# Coordinates Convert
|
||||
|
||||
Приложение демонстрирует преобразование координат
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
|
||||
# Coordinates Convert
|
||||
|
||||
The given code represents a class called ProjectPresenter, which contains a method called ConverAndReport(). This method utilizes the Aspose.Gis library to convert geographic coordinates and generate an output string with the results.
|
||||
|
||||
The method performs the following operations:
|
||||
|
||||
- The method then calls the GeoConvert.AsPointText() method, which is part of the Aspose.Gis library, to convert the given latitude (25.5) and longitude (45.5) coordinates into various mapping formats. It makes use of different format options available in the library.
|
||||
|
||||
The conversion is done for the following formats:
|
||||
|
||||
- Decimal Degrees (DD) format: The coordinates are converted to decimal degrees using the PointFormats.DecimalDegrees format option.
|
||||
|
||||
- Degrees Decimal Minutes (DDM) format: The coordinates are converted to degrees and decimal minutes using the PointFormats.DegreeDecimalMinutes format option.
|
||||
|
||||
- Degrees Minutes Seconds (DMS) format: The coordinates are converted to degrees, minutes, and seconds using the PointFormats.DegreeMinutesSeconds format option.
|
||||
|
||||
- GeoRef format: The coordinates are converted to the World Geographic Reference System format using the PointFormats.GeoRef format option.
|
||||
|
||||
- Mgrs format: The coordinates are converted to the Military Grid Reference System format using the PointFormats.Mgrs format option.
|
||||
|
||||
- Usng format: The coordinates are converted to the United States National Grid format using the PointFormats.Usng format option.
|
||||
|
||||
For each conversion format, the result is appended to the output string with the corresponding format label.
|
||||
|
||||
- The method returns the string representation of the output string, which contains the conversion results in various mapping formats.
|
||||
|
||||
Therefore, the ConverAndReport() method converts the given geographic coordinates (25.5, 45.5) into multiple mapping formats, adds the results to the output string, and returns a string with the conversion results. The supported formats include Decimal Degrees (DD), Degrees Decimal Minutes (DDM), Degrees Minutes Seconds (DMS), GeoRef, Mgrs, and Usng.
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<Application x:Class="Geo.Coordinates.Transformation.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Geo.Coordinates.Transformation"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Geo.Coordinates.Transformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ReadMe-Ru.md" />
|
||||
<None Remove="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ReadMe.md" />
|
||||
<EmbeddedResource Include="ReadMe-Ru.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspose.GIS" Version="23.8.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<Window x:Class="Geo.Coordinates.Transformation.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Geo.Coordinates.Transformation"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<DockPanel x:Name="MyPanel">
|
||||
<Border DockPanel.Dock="Top">
|
||||
<TextBlock/>
|
||||
</Border>
|
||||
<Border Background="Blue" DockPanel.Dock="Bottom" Height="100">
|
||||
<Button Content="Transform" Click="LaunchButton_Click" FontSize="18px" />
|
||||
</Border>
|
||||
<Border Background="WhiteSmoke" >
|
||||
<TextBox x:Name="pOutput" HorizontalAlignment="Left" IsReadOnly="True"
|
||||
TextWrapping="Wrap" Background="Transparent"
|
||||
BorderThickness="0" Margin="10" />
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
using Aspose.Gis.SpatialReferencing;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Geo.Coordinates.Transformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
private ProjectPresenter _projectPresenter = new ProjectPresenter();
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void LaunchButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var report = _projectPresenter.TransformAndReport();
|
||||
pOutput.Text = report.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Geo.Coordinates.Transformation
|
||||
{
|
||||
public class ProjectInfo
|
||||
{
|
||||
public string Description => new StreamReader(Assembly.GetExecutingAssembly()
|
||||
.GetManifestResourceStream("Geo.Coordinates.Transformation.ReadMe.md")!).ReadToEnd();
|
||||
|
||||
public string Title { get; } = "Coordinates Transformation";
|
||||
|
||||
public void Run()
|
||||
{
|
||||
var newForm = new MainWindow();
|
||||
newForm.Title = Title;
|
||||
newForm.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
using Aspose.Gis.SpatialReferencing;
|
||||
using System.Text;
|
||||
|
||||
namespace Geo.Coordinates.Transformation
|
||||
{
|
||||
internal class ProjectPresenter
|
||||
{
|
||||
public string TransformAndReport()
|
||||
{
|
||||
var output = new StringBuilder();
|
||||
output.AppendLine("START").AppendLine();
|
||||
|
||||
// Source and destination SRS
|
||||
var utm32N = SpatialReferenceSystem.CreateFromEpsg(32632);
|
||||
var latLong = SpatialReferenceSystem.CreateFromEpsg(4326);
|
||||
var transformation = utm32N.CreateTransformationTo(latLong);
|
||||
|
||||
// Transform geometry
|
||||
var utmPoint = new Aspose.Gis.Geometries.Point(510000, 7042000);
|
||||
var geoPoint = transformation.Transform(utmPoint) as Aspose.Gis.Geometries.Point;
|
||||
|
||||
// Write result
|
||||
output.AppendLine("UTM Easting: " + utmPoint.X);
|
||||
output.AppendLine("UTM Northing: " + utmPoint.Y);
|
||||
output.AppendLine("Longitude: " + geoPoint.X);
|
||||
output.AppendLine("Latitude: " + geoPoint.Y);
|
||||
|
||||
output.AppendLine().AppendLine("OK");
|
||||
|
||||
return output.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
# Coordinates Transform
|
||||
|
||||
The Coordinate Transformation - это демонстрация для преобразования координат из одной SRS (пространственной системы отсчета) в другую SRS и отображения результата.
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
# Coordinates Transform
|
||||
|
||||
The code begins by defining the source and destination Spatial Reference Systems (SRS). It creates SRS objects for UTM Zone 32 North and WGS84 using EPSG codes.
|
||||
|
||||
Then, a transformation object is created using the source and destination SRS. This transformation enables the conversion from UTM coordinates to latitude and longitude coordinates.
|
||||
|
||||
Next, a UTM point object is created with specific easting and northing coordinates.
|
||||
|
||||
The transformation object is used to convert the UTM point to a geographic point, represented by longitude and latitude.
|
||||
|
||||
Finally, the code outputs the UTM easting value, UTM northing value, longitude, and latitude, appending them to the output string.
|
||||
|
||||
In summary, the code performs a coordinate transformation from UTM Zone 32 North to latitude and longitude.
|
||||
It converts a UTM point to its corresponding geographic point using the defined SRS and transformation. The resulting UTM easting, UTM northing, longitude, and latitude values are then displayed.
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.4.33213.308
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Demo.Run", "Geo.Demo.Run\Geo.Demo.Run.csproj", "{6DC1202B-2016-4DC0-B9DD-119E04CC0125}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Viewer.WPF", "Geo.Viewer\Geo.Viewer.WPF.csproj", "{CDCF2499-4D29-4701-BF94-416D7F0390F7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Layers.Conversion", "Geo.Layers.Conversion\Geo.Layers.Conversion.csproj", "{3EDE19DA-541D-4B16-8356-AB1F3EA083A2}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Layers.InMemory", "Geo.Layers.InMemory\Geo.Layers.InMemory.csproj", "{02283291-1966-4DD5-8E0B-BCBCD0D497BB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Coordinates.Convert", "Geo.Coordinates.Convert\Geo.Coordinates.Convert.csproj", "{39FADE85-729C-4CC2-B6BE-5CDFD043D780}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Coordinates.Transformation", "Geo.Coordinates.Transformation\Geo.Coordinates.Transformation.csproj", "{0501FEAF-3918-4C10-A5CF-9980EF51C136}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Advanced.Viewer", "Geo.Advanced.Viewer\Geo.Advanced.Viewer.csproj", "{89BAB5BB-02FB-4FE1-8C71-1757CDD6A994}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Map.Generator", "Geo.Map.Generator\Geo.Map.Generator.csproj", "{1B8BEF90-E9E9-47E9-97AC-AE4E5B5AB10E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Rasters.Viewer", "Geo.Rasters.Viewer\Geo.Rasters.Viewer.csproj", "{92240CA4-0183-4E7D-AD5B-7955EAE547AB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Epsg.Viewer", "Geo.Epsg.Viewer\Geo.Epsg.Viewer.csproj", "{17F69DFA-C390-4CF2-B6A5-953164580C21}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Features.Editor", "Geo.Features.Editor\Geo.Features.Editor.csproj", "{D599B148-1611-4D69-B469-E71FB928A011}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Map.Rendering", "Geo.Map.Rendering\Geo.Map.Rendering.csproj", "{B8C7D17E-807F-4AAA-ABA3-D806DF24B845}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Geo.Tools.Paths", "Geo.Tools.Paths\Geo.Tools.Paths.csproj", "{54DDFE29-15F1-4EE8-A3A1-1E6EAF65663C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6DC1202B-2016-4DC0-B9DD-119E04CC0125}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6DC1202B-2016-4DC0-B9DD-119E04CC0125}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6DC1202B-2016-4DC0-B9DD-119E04CC0125}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6DC1202B-2016-4DC0-B9DD-119E04CC0125}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CDCF2499-4D29-4701-BF94-416D7F0390F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CDCF2499-4D29-4701-BF94-416D7F0390F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CDCF2499-4D29-4701-BF94-416D7F0390F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CDCF2499-4D29-4701-BF94-416D7F0390F7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3EDE19DA-541D-4B16-8356-AB1F3EA083A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3EDE19DA-541D-4B16-8356-AB1F3EA083A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3EDE19DA-541D-4B16-8356-AB1F3EA083A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3EDE19DA-541D-4B16-8356-AB1F3EA083A2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{02283291-1966-4DD5-8E0B-BCBCD0D497BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{02283291-1966-4DD5-8E0B-BCBCD0D497BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{02283291-1966-4DD5-8E0B-BCBCD0D497BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{02283291-1966-4DD5-8E0B-BCBCD0D497BB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{39FADE85-729C-4CC2-B6BE-5CDFD043D780}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{39FADE85-729C-4CC2-B6BE-5CDFD043D780}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{39FADE85-729C-4CC2-B6BE-5CDFD043D780}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{39FADE85-729C-4CC2-B6BE-5CDFD043D780}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0501FEAF-3918-4C10-A5CF-9980EF51C136}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0501FEAF-3918-4C10-A5CF-9980EF51C136}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0501FEAF-3918-4C10-A5CF-9980EF51C136}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0501FEAF-3918-4C10-A5CF-9980EF51C136}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{89BAB5BB-02FB-4FE1-8C71-1757CDD6A994}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{89BAB5BB-02FB-4FE1-8C71-1757CDD6A994}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{89BAB5BB-02FB-4FE1-8C71-1757CDD6A994}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{89BAB5BB-02FB-4FE1-8C71-1757CDD6A994}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1B8BEF90-E9E9-47E9-97AC-AE4E5B5AB10E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1B8BEF90-E9E9-47E9-97AC-AE4E5B5AB10E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1B8BEF90-E9E9-47E9-97AC-AE4E5B5AB10E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1B8BEF90-E9E9-47E9-97AC-AE4E5B5AB10E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{92240CA4-0183-4E7D-AD5B-7955EAE547AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{92240CA4-0183-4E7D-AD5B-7955EAE547AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{92240CA4-0183-4E7D-AD5B-7955EAE547AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{92240CA4-0183-4E7D-AD5B-7955EAE547AB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{17F69DFA-C390-4CF2-B6A5-953164580C21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{17F69DFA-C390-4CF2-B6A5-953164580C21}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{17F69DFA-C390-4CF2-B6A5-953164580C21}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{17F69DFA-C390-4CF2-B6A5-953164580C21}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D599B148-1611-4D69-B469-E71FB928A011}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D599B148-1611-4D69-B469-E71FB928A011}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D599B148-1611-4D69-B469-E71FB928A011}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D599B148-1611-4D69-B469-E71FB928A011}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B8C7D17E-807F-4AAA-ABA3-D806DF24B845}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B8C7D17E-807F-4AAA-ABA3-D806DF24B845}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B8C7D17E-807F-4AAA-ABA3-D806DF24B845}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B8C7D17E-807F-4AAA-ABA3-D806DF24B845}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{54DDFE29-15F1-4EE8-A3A1-1E6EAF65663C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{54DDFE29-15F1-4EE8-A3A1-1E6EAF65663C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{54DDFE29-15F1-4EE8-A3A1-1E6EAF65663C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{54DDFE29-15F1-4EE8-A3A1-1E6EAF65663C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {6939D086-6529-4E24-82F9-147398945707}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<Application x:Class="Geo.Demo.Run.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Geo.Demo.Run"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Geo.Demo.Run
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
ncols 8
|
||||
nrows 6
|
||||
xllcorner 0
|
||||
yllcorner 0
|
||||
cellsize 10
|
||||
NODATA_value -9999
|
||||
55 55 -2080 -1909 55 -601 55 -1362
|
||||
-510 -387 350 -182 55 55 55 27
|
||||
13 -92 55 -33 54 28 -182 -750
|
||||
59 -165 18 167 -182 55 -608 666
|
||||
-62 55 -805 55 55 55 55 -497
|
||||
55 55 332 1240 55 55 55 55
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[
|
||||
{
|
||||
"Id": 1,
|
||||
"YearBuild": "1983-07-26T00:00:00"
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"YearBuild": "1984-08-19T00:00:00"
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"YearBuild": "2002-06-02T00:00:00"
|
||||
}
|
||||
]
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Data\sample.asc" />
|
||||
<None Remove="Data\test.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Data\sample.asc" />
|
||||
<EmbeddedResource Include="Data\test.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Geo.Advanced.Viewer\Geo.Advanced.Viewer.csproj" />
|
||||
<ProjectReference Include="..\Geo.Coordinates.Convert\Geo.Coordinates.Convert.csproj" />
|
||||
<ProjectReference Include="..\Geo.Coordinates.Transformation\Geo.Coordinates.Transformation.csproj" />
|
||||
<ProjectReference Include="..\Geo.Epsg.Viewer\Geo.Epsg.Viewer.csproj" />
|
||||
<ProjectReference Include="..\Geo.Features.Editor\Geo.Features.Editor.csproj" />
|
||||
<ProjectReference Include="..\Geo.Layers.Conversion\Geo.Layers.Conversion.csproj" />
|
||||
<ProjectReference Include="..\Geo.Layers.InMemory\Geo.Layers.InMemory.csproj" />
|
||||
<ProjectReference Include="..\Geo.Layers.Join\Geo.Layers.Join.csproj" />
|
||||
<ProjectReference Include="..\Geo.Map.Generator\Geo.Map.Generator.csproj" />
|
||||
<ProjectReference Include="..\Geo.Map.Rendering\Geo.Map.Rendering.csproj" />
|
||||
<ProjectReference Include="..\Geo.Rasters.Viewer\Geo.Rasters.Viewer.csproj" />
|
||||
<ProjectReference Include="..\Geo.Tools.Paths\Geo.Tools.Paths.csproj" />
|
||||
<ProjectReference Include="..\Geo.Viewer\Geo.Viewer.WPF.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Maps\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Geo.Demo.Run
|
||||
{
|
||||
internal interface IDemoProject
|
||||
{
|
||||
string Description { get; }
|
||||
string Title { get; }
|
||||
void Run();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace Geo.Demo.Run
|
||||
{
|
||||
internal class LauncherPresneter
|
||||
{
|
||||
public List<IDemoProject> Projects = new List<IDemoProject>();
|
||||
|
||||
public LauncherPresneter()
|
||||
{
|
||||
Projects.Add(new AdvancedViewer());
|
||||
Projects.Add(new DemoGeometryListViewer());
|
||||
Projects.Add(new MapGenerator());
|
||||
Projects.Add(new MapRendering());
|
||||
Projects.Add(new LayerConvertor());
|
||||
Projects.Add(new CoordinatesConvertor());
|
||||
Projects.Add(new CoordinatesTransformer());
|
||||
Projects.Add(new RastersViewer());
|
||||
Projects.Add(new EpsgViewer());
|
||||
Projects.Add(new FeaturesEditor());
|
||||
Projects.Add(new MLayerEditor());
|
||||
Projects.Add(new DataExtractor());
|
||||
Projects.Add(new LayersJoin());
|
||||
}
|
||||
|
||||
public IDemoProject GetProjectByTitle(string title)
|
||||
{
|
||||
foreach (var project in Projects)
|
||||
{
|
||||
if (project.Title == title)
|
||||
return project;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public class AdvancedViewer : Advanced.Viewer.ProjectInfo, IDemoProject { }
|
||||
public class DemoGeometryListViewer : ProjectInfo, IDemoProject { }
|
||||
public class MapGenerator : Map.Generator.ProjectInfo, IDemoProject { }
|
||||
public class MapRendering : Map.Rendering.ProjectInfo, IDemoProject { }
|
||||
public class LayerConvertor : Layers.Conversion.ProjectInfo, IDemoProject { }
|
||||
public class CoordinatesConvertor : Coordinates.Convert.ProjectInfo, IDemoProject { }
|
||||
public class CoordinatesTransformer : Coordinates.Transformation.ProjectInfo, IDemoProject { }
|
||||
public class RastersViewer : Rasters.Viewer.ProjectInfo, IDemoProject { }
|
||||
public class EpsgViewer : Epsg.Viewer.ProjectInfo, IDemoProject { }
|
||||
public class FeaturesEditor : Features.Editor.ProjectInfo, IDemoProject { }
|
||||
public class MLayerEditor : Layers.InMemory.ProjectInfo, IDemoProject { }
|
||||
public class DataExtractor : Tools.Paths.ProjectInfo, IDemoProject { }
|
||||
public class LayersJoin : Layers.Join.ProjectInfo, IDemoProject { }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
<Window x:Class="Geo.Demo.Run.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Geo.Demo.Run"
|
||||
mc:Ignorable="d"
|
||||
Title="PanelDemoHub" Height="450" Width="800">
|
||||
<DockPanel x:Name="MyPanel">
|
||||
<Border DockPanel.Dock="Top">
|
||||
<TextBlock/>
|
||||
</Border>
|
||||
<Border Background="Orange" DockPanel.Dock="Left" Width="300">
|
||||
<ListBox x:Name="DemoList">
|
||||
<ListBoxItem Content="{Binding Path=Title}"></ListBoxItem>
|
||||
</ListBox>
|
||||
</Border>
|
||||
<Border Background="Blue" DockPanel.Dock="Bottom" Height="100">
|
||||
<Button Content="Launch" Click="LaunchButton_Click" FontSize="18px" />
|
||||
</Border>
|
||||
<Border Background="WhiteSmoke" >
|
||||
<TextBlock x:Name="myDescription" HorizontalAlignment="Left"
|
||||
TextWrapping="Wrap" Margin="10" />
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Geo.Demo.Run
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
private LauncherPresneter projects = new LauncherPresneter();
|
||||
private IDemoProject current = null!;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
foreach (var item in projects.Projects)
|
||||
{
|
||||
DemoList.Items.Add(new ListBoxItem() { Content = item.Title });
|
||||
}
|
||||
DemoList.SelectionChanged += ChangeDescription;
|
||||
}
|
||||
|
||||
private void ChangeDescription(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
current = projects.GetProjectByTitle((DemoList.SelectedItem as ListBoxItem).Content.ToString());
|
||||
myDescription.Text = current.Description;
|
||||
}
|
||||
|
||||
private void LaunchButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
current?.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 12 KiB |
|
|
@ -1,9 +0,0 @@
|
|||
<Application x:Class="Geo.Epsg.Viewer.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Geo.Epsg.Viewer"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Geo.Epsg.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ReadMe-Ru.md" />
|
||||
<None Remove="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ReadMe-Ru.md" />
|
||||
<EmbeddedResource Include="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspose.GIS" Version="23.8.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
<Window x:Class="Geo.Epsg.Viewer.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Geo.Epsg.Viewer"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<DockPanel x:Name="MyPanel">
|
||||
<Border DockPanel.Dock="Top">
|
||||
<TextBlock/>
|
||||
</Border>
|
||||
<Border Background="Blue" DockPanel.Dock="Bottom" Height="100">
|
||||
<Button Content="Search" Click="LaunchButton_Click" FontSize="18px" />
|
||||
</Border>
|
||||
<Viewbox StretchDirection="Both" MaxHeight="30" HorizontalAlignment="Left">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="0, 0, 5, 0" Text="Epsg Code:" />
|
||||
<TextBox x:Name="eWorkFolder" MinWidth="50" Text="4326" />
|
||||
</StackPanel>
|
||||
</Viewbox>
|
||||
<Border Background="WhiteSmoke" >
|
||||
<TextBox x:Name="pOutput" HorizontalAlignment="Left" IsReadOnly="True"
|
||||
TextWrapping="Wrap" Background="Transparent"
|
||||
BorderThickness="0" Margin="10" />
|
||||
</Border>
|
||||
|
||||
</DockPanel>
|
||||
</Window>
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Geo.Epsg.Viewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private ProjectPresenter _projectPresenter = new();
|
||||
|
||||
private void LaunchButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var report = _projectPresenter.ReadAndReport(eWorkFolder.Text);
|
||||
pOutput.Text = report.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Geo.Epsg.Viewer
|
||||
{
|
||||
public class ProjectInfo
|
||||
{
|
||||
public string Description => new StreamReader(Assembly.GetExecutingAssembly()
|
||||
.GetManifestResourceStream("Geo.Epsg.Viewer.ReadMe.md")!).ReadToEnd();
|
||||
|
||||
public string Title { get; } = "Epsg Viewer";
|
||||
|
||||
public void Run()
|
||||
{
|
||||
var newForm = new MainWindow();
|
||||
newForm.Title = Title;
|
||||
newForm.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
using System.Text;
|
||||
|
||||
namespace Geo.Epsg.Viewer
|
||||
{
|
||||
internal class ProjectPresenter
|
||||
{
|
||||
public string ReadAndReport(string epsgValue)
|
||||
{
|
||||
var output = new StringBuilder();
|
||||
output.AppendLine("START").AppendLine();
|
||||
|
||||
if (!string.IsNullOrEmpty(epsgValue) && IsTextNumeric(epsgValue))
|
||||
{
|
||||
output.AppendLine("ERROR: INVALID ENTRY VALUE");
|
||||
return output.ToString();
|
||||
}
|
||||
|
||||
var status = Aspose.Gis.SpatialReferencing.SpatialReferenceSystem.TryCreateFromEpsg(int.Parse(epsgValue), out var referenceSystem);
|
||||
output.AppendLine("Is succesful: " + status.ToString());
|
||||
|
||||
if (status)
|
||||
{
|
||||
output.AppendLine("WKT: " + referenceSystem.ExportToWkt());
|
||||
output.AppendLine("Datum: " + referenceSystem.GeographicDatum.ToString());
|
||||
}
|
||||
|
||||
output.AppendLine().AppendLine("OK");
|
||||
return output.ToString();
|
||||
}
|
||||
private bool IsTextNumeric(string str)
|
||||
{
|
||||
System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex("[^0-9]");
|
||||
return reg.IsMatch(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
# EPSG Viewer
|
||||
|
||||
Это приложение предназначено для быстрого получения всей доступной информации о SRS путем ввода соответствующего кода EPSG.
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
# EPSG Viewer
|
||||
|
||||
The code verifies the EPSG value and generates an output string with information about the corresponding SpatialReferenceSystem. If the EPSG value is invalid, it returns an error message.
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<Application x:Class="Geo.Features.Editor.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Geo.Features.Editor"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Geo.Features.Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ReadMe-Ru.md" />
|
||||
<None Remove="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ReadMe-Ru.md" />
|
||||
<EmbeddedResource Include="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspose.GIS" Version="23.8.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<Window x:Class="Geo.Features.Editor.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Geo.Features.Editor"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<Grid x:Name="myGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10px"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="10px"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Viewbox StretchDirection="Both" MaxHeight="30" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="5, 0, 5, 0" Text="New Feature Value:" />
|
||||
<TextBox x:Name="featureValue" MinWidth="50" Text="0" />
|
||||
</StackPanel>
|
||||
</Viewbox>
|
||||
<Border Background="WhiteSmoke" Grid.Column="1" Grid.Row="1" Grid.RowSpan="3">
|
||||
<TextBox x:Name="pOutput" HorizontalAlignment="Left" IsReadOnly="True"
|
||||
TextWrapping="Wrap" Background="Transparent"
|
||||
BorderThickness="0" Margin="10" />
|
||||
</Border>
|
||||
<Button Grid.Column="0" Grid.Row="4" Grid.RowSpan="1" Click="Button_Click">Write</Button>
|
||||
<Button Grid.Column="1" Grid.Row="4" Grid.RowSpan="1" Click="Button_Click_1">Show</Button>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
using Aspose.Gis;
|
||||
using Aspose.Gis.GeoTools.Extensions;
|
||||
using Geo.Features.Editor.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection.Emit;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Geo.Features.Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private ProjectPresenter _projectPresenter = new();
|
||||
|
||||
VectorLayer Layer = Drivers.InMemory.CreateLayer();
|
||||
List<ExampleModel> featuresList = new List<ExampleModel>();
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string report = _projectPresenter.AddAndReport(featureValue.Text);
|
||||
pOutput.Text = report;
|
||||
}
|
||||
private void Button_Click_1(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string report = _projectPresenter.ReadAddReport();
|
||||
pOutput.Text = report;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
namespace Geo.Features.Editor.Models
|
||||
{
|
||||
public class ExampleModel
|
||||
{
|
||||
public int Order { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Geo.Features.Editor{
|
||||
public class ProjectInfo
|
||||
{
|
||||
public string Description => new StreamReader(Assembly.GetExecutingAssembly()
|
||||
.GetManifestResourceStream("Geo.Features.Editor.ReadMe.md")!).ReadToEnd();
|
||||
|
||||
public string Title { get; } = "Features Editor";
|
||||
|
||||
public void Run()
|
||||
{
|
||||
var newForm = new MainWindow();
|
||||
newForm.Title = Title;
|
||||
newForm.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
using Aspose.Gis;
|
||||
using Geo.Features.Editor.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows;
|
||||
using Aspose.Gis.GeoTools.Extensions;
|
||||
|
||||
namespace Geo.Features.Editor
|
||||
{
|
||||
internal class ProjectPresenter
|
||||
{
|
||||
public VectorLayer _layer;
|
||||
List<ExampleModel> _featuresList = new();
|
||||
int _order = 0;
|
||||
|
||||
public void CreateLayer()
|
||||
{
|
||||
//Creating a Drivers.InMemory layer.
|
||||
_layer = Drivers.InMemory.CreateLayer();
|
||||
}
|
||||
public string AddAndReport(string featureValue)
|
||||
{
|
||||
var output = new StringBuilder();
|
||||
output.AppendLine($"START {nameof(AddAndReport)}").AppendLine();
|
||||
|
||||
CreateLayer(); //re-creating layer to enable modifying features
|
||||
_featuresList.Add(new ExampleModel() { Value = !string.IsNullOrEmpty(featureValue) ? featureValue : "0", Order = _order });
|
||||
_order += 1;
|
||||
try
|
||||
{
|
||||
_layer.AddFeatures(_featuresList);
|
||||
output.AppendLine("Success");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
output.AppendLine("Error:" + ex.Message);
|
||||
}
|
||||
return output.ToString();
|
||||
}
|
||||
|
||||
public string ReadAddReport()
|
||||
{
|
||||
var output = new StringBuilder();
|
||||
output.AppendLine($"START {nameof(ReadAddReport)}").AppendLine();
|
||||
|
||||
var layerСomponents = _layer.GetObjects<ExampleModel>();
|
||||
|
||||
foreach (ExampleModel model in layerСomponents)
|
||||
{
|
||||
output.AppendLine(String.Format("Feature#{0} Value: {1}", model.Order, model.Value));
|
||||
}
|
||||
|
||||
return output.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
# Feature Editor
|
||||
|
||||
Это приложение показывает использование функций добавления / чтения объектов для слоев.
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
# Feature Editor
|
||||
|
||||
The code creates a ProjectPresenter class that simplifies data management by encapsulating operations on a vector layer. It provides methods for creating the layer, adding features, and generating a report. By abstracting away complex implementation details, the code allows for a more streamlined and intuitive way of working with data.
|
||||
It simplifies the process of adding features to the layer and generates a clear report of the added features, making data manipulation more straightforward and efficient.
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<Application x:Class="Geo.Layers.Conversion.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Geo.Layers.Conversion
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="data\sample.geojson" />
|
||||
<None Remove="ReadMe-Ru.md" />
|
||||
<None Remove="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="data\sample.geojson">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ReadMe-Ru.md" />
|
||||
<EmbeddedResource Include="ReadMe.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspose.GIS" Version="23.8.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<Window x:Class="Geo.Layers.Conversion.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<DockPanel x:Name="MyPanel">
|
||||
<Border DockPanel.Dock="Top">
|
||||
<TextBlock/>
|
||||
</Border>
|
||||
<Border Background="Blue" DockPanel.Dock="Bottom" Height="100">
|
||||
<Button Content="Convert" Click="LaunchButton_Click" FontSize="18px" />
|
||||
</Border>
|
||||
<Border Background="WhiteSmoke" >
|
||||
<TextBox x:Name="pOutput" HorizontalAlignment="Left" IsReadOnly="True"
|
||||
TextWrapping="Wrap" Background="Transparent"
|
||||
BorderThickness="0" Margin="10" />
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
using Aspose.Gis;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace Geo.Layers.Conversion
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private ProjectPresenter _projectPresenter = new();
|
||||
|
||||
private void LaunchButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var report = _projectPresenter.ConvertAndReport();
|
||||
pOutput.Text = report.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Geo.Layers.Conversion
|
||||
{
|
||||
public class ProjectInfo
|
||||
{
|
||||
public string Description => new StreamReader(Assembly.GetExecutingAssembly()
|
||||
.GetManifestResourceStream("Geo.Layers.Conversion.ReadMe.md")!).ReadToEnd();
|
||||
|
||||
public string Title { get; } = "Layer Conversion";
|
||||
|
||||
public void Run()
|
||||
{
|
||||
var newForm = new MainWindow();
|
||||
newForm.Title = Title;
|
||||
newForm.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
using Aspose.Gis;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Geo.Layers.Conversion
|
||||
{
|
||||
internal class ProjectPresenter
|
||||
{
|
||||
public string ConvertAndReport()
|
||||
{
|
||||
var output = new StringBuilder();
|
||||
output.AppendLine("START");
|
||||
output.AppendLine("Convert from Geo JSON to KML");
|
||||
|
||||
VectorLayer.Convert("data/sample.geojson", Drivers.GeoJson, "output.kml", Drivers.Kml);
|
||||
|
||||
output.AppendLine("Result KML:");
|
||||
output.AppendLine(File.ReadAllText("output.kml"));
|
||||
|
||||
|
||||
output.AppendLine();
|
||||
output.AppendLine("OK");
|
||||
|
||||
return output.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
# Layers Conversion
|
||||
|
||||
Приложение демонстрирует преобразование форматов файлов.
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
# Layers Conversion
|
||||
|
||||
The code performs a conversion from GeoJSON to KML format. It initializes an output string and appends a "START" message to it. Then, it converts a GeoJSON file to KML using specific drivers. The resulting KML content is appended to the output string. Finally, the code appends an "OK" message to the output string and returns it as the final result.
|
||||
Overall, the code converts data from one format to another and generates an output string with relevant information.
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"id": 0,
|
||||
"properties": {
|
||||
"name": "point_feature",
|
||||
"group": "group1"
|
||||
},
|
||||
"geometry": { "type": "Point", "coordinates": [ 102.0, 0.5 ] }
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"id": 1,
|
||||
"properties": {
|
||||
"name": "point_feature2",
|
||||
"group": "group1"
|
||||
},
|
||||
"geometry": { "type": "Point", "coordinates": [ 98.0, 3.5 ] }
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"id": 2,
|
||||
"properties": {
|
||||
"name": "line_feature"
|
||||
},
|
||||
"geometry": { "type": "LineString", "coordinates": [ [ 102.0, 0.0 ], [ 103.0, 1.0 ], [ 104.0, 0.0 ], [ 105.0, 1.0 ] ] }
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"id": 3,
|
||||
"properties": {
|
||||
"name": "polygon_feature",
|
||||
"group": "group2"
|
||||
},
|
||||
"geometry": { "type": "Polygon", "coordinates": [ [ [ 100.0, 0.0 ], [ 100.0, 1.0 ], [ 101.0, 1.0 ], [ 101.0, 0.0 ], [ 100.0, 0.0 ] ] ] }
|
||||
}
|
||||
]
|
||||
}
|
||||