Skip to content

DiGi.GIS.PostgreSQL.WebAPI

github-actions[bot] edited this page Jul 1, 2026 · 1 revision

DiGi.GIS.PostgreSQL.WebAPI Namespace

Classes

Create Class

public static class Create

Inheritance System.Object → Create

Methods

Create.GISPostgreSQLWebAPIConfigurationFileWatcher() Method

Creates a new instance of the GISPostgreSQLWebAPIConfigurationFileWatcher class.

public static DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIConfigurationFileWatcher GISPostgreSQLWebAPIConfigurationFileWatcher();

Returns

GISPostgreSQLWebAPIConfigurationFileWatcher
A task that represents the asynchronous operation.

Create.GISPostgreSQLWebAPIManager() Method

Creates a new instance of the GISPostgreSQLWebAPIManager class.

public static DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? GISPostgreSQLWebAPIManager();

Returns

GISPostgreSQLWebAPIManager
A task that represents the asynchronous operation.

Create.HttpClient_Geoportal(GISPostgreSQLWebAPIManager) Method

Creates and configures an System.Net.Http.HttpClient instance for the Geoportal service, including a custom User-Agent header based on the executing assembly's name and version.

public static System.Net.Http.HttpClient? HttpClient_Geoportal(DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager gISPostgreSQLWebAPIManager);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The manager used to create the HTTP client instance.

Returns

System.Net.Http.HttpClient
A task that represents the asynchronous operation.

Create.HttpContent(this byte[], CancellationToken) Method

Asynchronously creates GZip-compressed HttpContent from the provided byte array.

public static System.Threading.Tasks.Task<System.Net.Http.HttpContent?> HttpContent(this byte[] bytes, System.Threading.CancellationToken cancellationToken);

Parameters

bytes System.Byte[]

The raw byte array to be compressed.

cancellationToken System.Threading.CancellationToken

A token to monitor for cancellation requests.

Returns

System.Threading.Tasks.Task<System.Net.Http.HttpContent>
A task that represents the asynchronous operation.

Create.HttpContent(this string, CancellationToken) Method

Converts a JSON string into an asynchronous System.Net.Http.HttpContent object.

public static System.Threading.Tasks.Task<System.Net.Http.HttpContent?> HttpContent(this string json, System.Threading.CancellationToken cancellationToken);

Parameters

json System.String

The JSON string to be converted.

cancellationToken System.Threading.CancellationToken

The cancellationToken.

Returns

System.Threading.Tasks.Task<System.Net.Http.HttpContent>
A task that represents the asynchronous operation.

Create.HttpContent<TSerializableObject>(this IEnumerable<TSerializableObject>, CancellationToken) Method

Converts a collection of serializable objects into an System.Net.Http.HttpContent object by first serializing them to a JSON string.

public static System.Threading.Tasks.Task<System.Net.Http.HttpContent?> HttpContent<TSerializableObject>(this System.Collections.Generic.IEnumerable<TSerializableObject> serializableObjects, System.Threading.CancellationToken cancellationToken)
    where TSerializableObject : DiGi.Core.Interfaces.ISerializableObject;

Type parameters

TSerializableObject

The type of the objects in the collection, which must implement DiGi.Core.Interfaces.ISerializableObject.

Parameters

serializableObjects System.Collections.Generic.IEnumerable<TSerializableObject>

The collection of objects to be serialized and converted to HTTP content.

cancellationToken System.Threading.CancellationToken

A token to cancel the asynchronous operation.

Returns

System.Threading.Tasks.Task<System.Net.Http.HttpContent>
A task that represents the asynchronous operation.

Create.ServiceProvider() Method

Creates and configures a service provider with the registered services.

public static System.IServiceProvider ServiceProvider();

Returns

System.IServiceProvider
An System.IServiceProvider containing the registered services.

Modify Class

public static class Modify

Inheritance System.Object → Modify

Methods

Modify.InitializeAsync(this IServiceCollection) Method

Initializes the GIS PostgreSQL Web API services, including the configuration file watcher and converter manager.

public static System.Threading.Tasks.Task InitializeAsync(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection);

Parameters

serviceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.

Returns

System.Threading.Tasks.Task
A System.Threading.Tasks.Task representing the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, AdministrativeAreal2D, PostOptions) Method

Updates a single administrative area item asynchronously.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, DiGi.GIS.Classes.AdministrativeAreal2D? administrativeAreal2D, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The GIS PostgreSQL Web API manager instance.

administrativeAreal2D DiGi.GIS.Classes.AdministrativeAreal2D

The administrative area item to be updated.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional configuration options for the HTTP POST request.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, Building2D, string, PostOptions) Method

Asynchronously updates building items in the PostgreSQL GIS database via the web API.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, DiGi.GIS.Classes.Building2D? building2D, string? code=null, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The manager instance used to handle communication with the PostgreSQL Web API.

building2D DiGi.GIS.Classes.Building2D

The DiGi.GIS.Classes.Building2D object containing the data to be updated.

code System.String

An optional identification code associated with the update request.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional configuration settings for the HTTP POST request.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, string, bool, bool, bool, SerializableObjectsPostOptions, IProgress<long>, Nullable<CancellationToken>) Method

Asynchronously updates items from the specified file system path.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, string? path, bool oT_ADJA_A=true, bool oT_ADMS_A=true, bool oT_BUBD_A=true, DiGi.GIS.PostgreSQL.WebAPI.Classes.SerializableObjectsPostOptions? serializableObjectsPostOptions=null, System.IProgress<long>? progress=null, System.Nullable<System.Threading.CancellationToken> cancellationToken=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The GIS PostgreSQL Web API manager instance.

path System.String

The file system path to the source data files.

oT_ADJA_A System.Boolean

Indicates whether items with the OT_ADJA_A suffix should be updated. Defaults to true.

oT_ADMS_A System.Boolean

Indicates whether items with the OT_ADMS_A suffix should be updated. Defaults to true.

oT_BUBD_A System.Boolean

Indicates whether items with the OT_BUBD_A suffix should be updated. Defaults to true.

serializableObjectsPostOptions SerializableObjectsPostOptions

The options used for serializing objects during the POST request.

progress System.IProgress<System.Int64>

The progress reporter for reporting progress updates.

cancellationToken System.Nullable<System.Threading.CancellationToken>

The cancellation token to observe.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, IEnumerable<EPWFile>, PostOptions) Method

Asynchronously updates a collection of EPW files.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, System.Collections.Generic.IEnumerable<DiGi.EPW.Classes.EPWFile>? ePWFiles, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The GIS PostgreSQL Web API manager instance.

ePWFiles System.Collections.Generic.IEnumerable<DiGi.EPW.Classes.EPWFile>

A collection of EPW files to update.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional configuration options for the POST request.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, IEnumerable<AdministrativeAreal2D>, PostOptions) Method

Asynchronously updates a collection of administrative area items.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.AdministrativeAreal2D>? administrativeAreal2Ds, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The GIS PostgreSQL Web API manager instance.

administrativeAreal2Ds System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.AdministrativeAreal2D>

A collection of administrative area items to update.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional configuration options for the POST request.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, IEnumerable<Building2D>, string, PostOptions) Method

Updates multiple 2D building items asynchronously.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.Building2D>? building2Ds, string? code=null, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The GIS PostgreSQL Web API manager instance.

building2Ds System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.Building2D>

A collection of DiGi.GIS.Classes.Building2D items to be updated.

code System.String

An optional code used for the update operation.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional configuration options for the POST request.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, IEnumerable<OccupancyData>, PostOptions) Method

Asynchronously updates multiple occupancy data items via the PostgreSQL Web API.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.OccupancyData>? occupancyDatas, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The manager instance used to facilitate the API communication.

occupancyDatas System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.OccupancyData>

The collection of DiGi.GIS.Classes.OccupancyData items to be updated.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional configuration options for the POST request.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, IEnumerable<OccupancyData>, string, PostOptions) Method

Asynchronously updates multiple occupancy data items via the Web API.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.OccupancyData>? occupancyDatas, string? code=null, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The GISPostgreSQLWebAPIManager instance used to create the HTTP client for the request.

occupancyDatas System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.OccupancyData>

A collection of DiGi.GIS.Classes.OccupancyData items to be updated.

code System.String

An optional code associated with the update operation.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional configuration settings for the HTTP POST request.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, IEnumerable<OrtoDatas>, int, PostOptions) Method

Updates multiple ortho data items for a specific county.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.OrtoDatas>? ortoDatas, int countyId, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The GISPostgreSQLWebAPIManager instance used to perform the update operation.

ortoDatas System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.OrtoDatas>

The collection of DiGi.GIS.Classes.OrtoDatas items to be updated.

countyId System.Int32

The unique identifier of the county for which the items are being updated.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional configuration options for the HTTP POST request.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, IEnumerable<OrtoDatas>, string, PostOptions) Method

Asynchronously updates multiple ortho data items via the PostgreSQL Web API.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.OrtoDatas>? ortoDatas, string? code=null, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The GISPostgreSQLWebAPIManager instance used to perform the update operation.

ortoDatas System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.OrtoDatas>

A collection of DiGi.GIS.Classes.OrtoDatas items to be updated.

code System.String

An optional code used to identify or filter the items for updating.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional configuration options for the update request.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this GISPostgreSQLWebAPIManager, IEnumerable<YearBuiltData>, string, PostOptions) Method

Asynchronously updates multiple year built data items via the PostgreSQL Web API.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this DiGi.GIS.PostgreSQL.WebAPI.Classes.GISPostgreSQLWebAPIManager? gISPostgreSQLWebAPIManager, System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.YearBuiltData>? yearBuiltDatas, string? code=null, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

gISPostgreSQLWebAPIManager GISPostgreSQLWebAPIManager

The manager instance used to facilitate the web API communication.

yearBuiltDatas System.Collections.Generic.IEnumerable<DiGi.GIS.Classes.YearBuiltData>

A collection of DiGi.GIS.Classes.YearBuiltData objects to be updated.

code System.String

An optional code identifier for the update request.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional configuration options for the POST request.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.UpdateItemsAsync(this HttpClient, string, string, PostOptions) Method

Asynchronously updates items by sending a JSON payload to the specified request URI.

public static System.Threading.Tasks.Task<bool> UpdateItemsAsync(this System.Net.Http.HttpClient httpClient, string? requestUri, string? json, DiGi.WebAPI.Classes.PostOptions? postOptions=null);

Parameters

httpClient System.Net.Http.HttpClient

The System.Net.Http.HttpClient used to perform the network request.

requestUri System.String

The target URI where the update request is sent.

json System.String

The JSON string containing the data to be updated.

postOptions DiGi.WebAPI.Classes.PostOptions

Optional DiGi.WebAPI.Classes.PostOptions used to configure the operation, such as specifying a delay.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation.

Modify.Update_Id(this Table, IEnumerable<Building2DReference>) Method

Updates the Id column of the table based on the provided building2DReferences. If a matching row is found (based on CountyId and Reference), it updates the Id value. If no matching row is found, it adds a new row with the CountyId, Reference, and Id values.

public static void Update_Id(this DiGi.Core.IO.Table.Classes.Table? table, System.Collections.Generic.IEnumerable<DiGi.GIS.PostgreSQL.Classes.Building2DReference>? building2DReferences);

Parameters

table DiGi.Core.IO.Table.Classes.Table

The table to update

building2DReferences System.Collections.Generic.IEnumerable<DiGi.GIS.PostgreSQL.Classes.Building2DReference>

The building2DReferences to use for updating

Clone this wiki locally