OverPassRequester 0.1.3-alpha
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
This is a prerelease version of OverPassRequester.
dotnet add package OverPassRequester --version 0.1.3-alpha
NuGet\Install-Package OverPassRequester -Version 0.1.3-alpha
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OverPassRequester" Version="0.1.3-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OverPassRequester --version 0.1.3-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OverPassRequester, 0.1.3-alpha"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OverPassRequester as a Cake Addin #addin nuget:?package=OverPassRequester&version=0.1.3-alpha&prerelease // Install OverPassRequester as a Cake Tool #tool nuget:?package=OverPassRequester&version=0.1.3-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
©sashamsuper, 2023
OverPassRequester
Library requests to overpass turbo on c sharp.
Now work only with overpass Ql.
Example.
using OverPassRequester;
OverPassClient over = new(new Uri("https://maps.mail.ru/osm/tools/overpass/api/interpreter"));
var river = "La Seine";
var city = "Paris";
string responseTxt = $"way['name:fr'~'{river}',i]['waterway'='river'](48.5366276064,1.89894557,49.0954664277,3.0497634411)->.river;(node(around.river:9150)['name:fr'~'{city}',i]['place'~'(city|village|town|hamlet)'];);";
var value = over.GetJsonAsync<RootObject<Element<Tags>>>(responseTxt).Result;
var name = value?.Elements.FirstOrDefault()?.Tags?.Name;
Assert.AreEqual(name, "Paris");
Console.WriteLine(name);
The default data model received in response in the library
public class Element<TTags>
{
[JsonPropertyName("type")]
public string? Type { get; set; }
[JsonPropertyName("id")]
public object? Id { get; set; }
[JsonPropertyName("lat")]
public double Lat { get; set; }
[JsonPropertyName("lon")]
public double Lon { get; set; }
[JsonPropertyName("timestamp")]
public DateTime Timestamp { get; set; }
[JsonPropertyName("version")]
public int Version { get; set; }
[JsonPropertyName("changeset")]
public int Changeset { get; set; }
[JsonPropertyName("user")]
public string? User { get; set; }
[JsonPropertyName("uid")]
public int Uid { get; set; }
[JsonPropertyName("tags")]
public TTags? Tags { get; set; }
}
public class Osm3s
{
[JsonPropertyName("timestamp_osm_base")]
public DateTime TimestampOsmBase { get; set; }
[JsonPropertyName("copyright")]
public string? Copyright { get; set; }
}
public class RootObject<TElement>
{
[JsonPropertyName("version")]
public double Version { get; set; }
[JsonPropertyName("generator")]
public string? Generator { get; set; }
[JsonPropertyName("osm3s")]
public Osm3s? Osm3s { get; set; }
[JsonPropertyName("elements")]
public List<TElement>? Elements { get; set; }
}
public class Tags
{
[JsonPropertyName("name")]
public string? Name { get; set; }
[JsonExtensionData]
public IDictionary<string, object>? ExtensionTags { set; get; }
}
OverPass returns RootObject<Element<Tags>>
You can change over.GetJsonAsync<T> or get ExtensionTags by Dictionary
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- System.Text.Json (>= 7.0.2)
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.3-alpha | 115 | 6/9/2023 |
0.1.2-alpha | 95 | 6/4/2023 |
0.1.1-alpha | 92 | 6/3/2023 |