IRI.Maptor.Core.Common 4.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package IRI.Maptor.Core.Common --version 4.0.0
                    
NuGet\Install-Package IRI.Maptor.Core.Common -Version 4.0.0
                    
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="IRI.Maptor.Core.Common" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IRI.Maptor.Core.Common" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="IRI.Maptor.Core.Common" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IRI.Maptor.Core.Common --version 4.0.0
                    
#r "nuget: IRI.Maptor.Core.Common, 4.0.0"
                    
#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.
#:package IRI.Maptor.Core.Common@4.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IRI.Maptor.Core.Common&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=IRI.Maptor.Core.Common&version=4.0.0
                    
Install as a Cake Tool

IRI.Maptor.Core.Common

NuGet Target

The foundational package of the Maptor GIS stack. It provides the core geometric primitives, abstractions, data structures, mathematics, unit types, and helper utilities that every other IRI.Maptor.* package builds on.

Installation

dotnet add package IRI.Maptor.Core.Common

Features

  • Geometric primitives: Point, PointM, PointZ, PointZM, BoundingBox, LineSegment, PointCollection
  • Core abstractions, enums, attributes, and JSON converters shared across the stack
  • DataSourceKind (IRI.Maptor.Core.Common.Enums): every format a layer can be read from or exported to, each with its category and file-dialog filter (DataSourceKindInfo), including FileGdb (a folder, no filter), GeoParquet, Grd (Esri ASCII grid) and the export-only Svg and Eps
  • Domain exceptions (IRI.Maptor.Core.Common.Exceptions) that carry a resource key for the user's message and an API result type, e.g. MaptorNoSaveAddressException (a layer's changes have nowhere to be saved; they stay pending)
  • Data structures: binary heaps (min/max), binary search tree, red-black tree, interval tree, order-statistic tree, B-tree, disjoint set, sort algorithms
  • Mathematics: Matrix, Vector, and eigenvalue/eigenvector computation (IRI.Maptor.Core.Common.Mathematics), plus statistics models
  • Linear and angular unit types with conversions: Meter, Foot, Mile, Yard, Inch, Rod, Chain, Degree, Radian, Grade (IRI.Maptor.Core.Common.Metrics)
  • Encodings: Base64 URL encoding and Persian DOS code page conversion
  • Helpers for I/O, JSON/XML, HTTP transport, hex strings, zip archives, randomness, and secure strings
  • Extension methods for common BCL types (strings, numbers, dates, collections)
  • Response/contract models for external map services (Google, Bing, Here, Mapzen)

Usage

Working with bounding boxes:

using IRI.Maptor.Core.Common.Primitives;

var bbox = new BoundingBox(xMin: 50.8, yMin: 35.5, xMax: 51.6, yMax: 35.9);

Console.WriteLine(bbox.Center);   // (51.2, 35.7)
Console.WriteLine(bbox.Width);    // 0.8

var merged = bbox.Add(new BoundingBox(50.0, 35.0, 51.0, 36.0));
var grown  = bbox.Expand(1.1);    // scale around the center

Converting between linear units:

using IRI.Maptor.Core.Common.Metrics;

var distance = new Meter(1609.344);
var miles = (Mile)distance;       // explicit conversion between unit types

Basic linear algebra:

using IRI.Maptor.Core.Common.Mathematics;

var m = new Matrix(new double[,] { { 1, 2 }, { 3, 4 } });

Describing a layer's fields (Field): the logical type and the allowed values travel with every field.

using IRI.Maptor.Core.Common.Primitives;

List<Field> fields = Field.GetFields<Pipe>();       // from [Field(...)] and domain attributes

FieldDataType type = fields[0].ResolveDataType();   // DataType, else what TypeFullName names, else Unknown
FieldDomain? domain = fields[0].Domain;             // values (+ codes) from a FieldDomainAttribute or [Field(AllowedValues = ...)]
bool allowed = domain?.Contains(4) == true;         // numbers compare by value whatever their CLR type

TypeFullName keeps the producer's native name (a .NET type name, or an SQL type name in the SQL Server schema readers); read the type with ResolveDataType(). Applications attach their own domains by deriving from FieldDomainAttribute.

See also


NuGet package · Report issues · Back to IRI.Maptor.Core

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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.

NuGet packages (21)

Showing the top 5 NuGet packages that depend on IRI.Maptor.Core.Common:

Package Downloads
IRI.Maptor.Core.Graph

A .NET standard library containing primitive graph structures and algorithms

IRI.Maptor.Core.SpatialReferenceSystem

A .NET standard library to transform various spatial reference systems

IRI.Maptor.Core.Spatial

A .NET standard library to work with spatial types, structures and algorithms (GeoJson, Geometry, KdTree, RTree, Delaunay, Simplification, etc.)

IRI.Maptor.Core.Ogc

A .NET standard library containing OGC standards such as SFA, SLD, WFS, WMS, GML, KML

IRI.Maptor.Core.ShapefileFormat

A .NET standard library to read/write shapefile (*.shp, *.shx, *.dbf, *.prj)

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.1 642 12/1/2026
4.0.1-alpha 600 12/1/2026
4.0.0 632 12/1/2026
4.0.0-alpha 591 12/1/2026
3.0.0 879 8/23/2026
3.0.0-alpha 817 8/22/2026