SymbolPoint service and client setup: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
This page covers running SymbolPoint under | This page covers running SymbolPoint under MariaServiceHoster in Maria GDK 5.2 and connecting MariaApplication, GeoObjectTileServer, or third-party applications. The GDK5 server uses HTTP, not SOAP or gRPC. Existing GDK4 clients can continue to use their legacy service. | ||
== Run SymbolPoint under MariaServiceHoster == | == Run SymbolPoint under MariaServiceHoster == | ||
| Line 26: | Line 26: | ||
== How MariaApplication selects a SymbolPoint source == | == How MariaApplication selects a SymbolPoint source == | ||
MariaApplication | Set <code>serviceMode</code> on the <code>SymbolPointService</code> endpoint to select how MariaApplication renders symbols: | ||
* '''InProcess:''' Use the integrated renderer and <code>symbolPointConfig.dataSources</code> from the effective general configuration. At least one path must be configured and at least one symbol product must load. | |||
* '''Http:''' Use the GDK5 HTTP endpoint. | |||
* '''Wcf:''' Use the legacy SOAP/WCF endpoint. | |||
Keep the local search paths configured when switching modes; explicit <code>Http</code> and <code>Wcf</code> ignore them. If <code>serviceMode</code> is omitted, MariaApplication uses the integrated renderer when local paths are configured and WCF otherwise. The selection is made at startup, with no automatic fallback. | |||
=== Upgrading to 5.2 === | |||
* '''Keeping a legacy server:''' Existing SOAP clients can keep their code, endpoint address, and WCF binding. The 5.2 configuration loader ignores <code>bindingRef</code>. An old <code>"bindingRef": "[binding]"</code> can be left in place or removed; the endpoint inherits the top-level <code>binding</code> unless it supplies its own. If an endpoint previously relied on the default binding without inheriting the top-level one, set its intended <code>binding</code> explicitly. | |||
* '''Switching to the GDK5 server:''' Set <code>serviceMode</code> to <code>Http</code> and update the endpoint address. An <code>http://</code> or <code>https://</code> address alone does not select the new API. A custom SOAP client must switch to an HTTP client; changing only its URL is not enough. | |||
* '''Replacing preview configuration:''' For SymbolPoint, replace <code>symbolPointConfig.httpServiceUri</code> or a <code>bindingRef</code>-based HTTP example with the named endpoint below. If a configuration contains <code>"binding": "RestApi"</code>, remove that value and use <code>"serviceMode": "Http"</code> for the applicable HTTP endpoint. Code that used <code>BindingType.RestApi</code> with a mode-aware client factory uses <code>GdkServiceMode.Http</code> instead. | |||
== Connect MariaApplication to GDK5 HTTP == | == Connect MariaApplication to GDK5 HTTP == | ||
Add or update the following entry in <code>ClientServiceConfiguration.local.json</code>: | |||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
| Line 44: | Line 50: | ||
"name": "SymbolPointService", | "name": "SymbolPointService", | ||
"address": "http://127.0.0.1:5110/symbolpoint", | "address": "http://127.0.0.1:5110/symbolpoint", | ||
" | "serviceMode": "Http" | ||
} | } | ||
] | ] | ||
| Line 50: | Line 56: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
For a remote deployment, use its published scheme, host, and port. Use the service base URL ending in <code>/symbolpoint</code>, not a <code>/web</code> or <code>/api/v1</code> endpoint. The <code>endpoints</code> array merges by name | For a remote deployment, use its published scheme, host, and port. Use the service base URL ending in <code>/symbolpoint</code>, not a <code>/web</code> or <code>/api/v1</code> endpoint. The <code>endpoints</code> array merges by name. With <code>"serviceMode": "Http"</code>, any inherited WCF binding is unused. | ||
Place each <code>.local.json</code> beside its active base file. MariaApplication looks in <code>%LocalAppData%\TeleplanGlobe\MariaGDK</code> first, then in the application folder. When running from source, local override files in the MariaApplication project directory are ignored by Git and copied to the application output on build. Restart MariaApplication after changing the effective configuration. | Place each <code>.local.json</code> beside its active base file. MariaApplication looks in <code>%LocalAppData%\TeleplanGlobe\MariaGDK</code> first, then in the application folder. When running from source, local override files in the MariaApplication project directory are ignored by Git and copied to the application output on build. Restart MariaApplication after changing the effective configuration. | ||
GDK5 renders PNG and SVG symbol products. It also accepts APP-6C/2525C codes with an unambiguous single-point mapping, using Delta artwork from <code>MilSymSVG</code>. It does not render GDK4 WPF artwork or multipoint graphics. Keep the legacy service if you need its original artwork. | |||
== Connect MariaApplication to legacy GDK4 WCF == | == Connect MariaApplication to legacy GDK4 WCF == | ||
Set <code>serviceMode</code> to <code>Wcf</code> and set the endpoint address to your legacy service: | |||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
| Line 68: | Line 72: | ||
"name": "SymbolPointService", | "name": "SymbolPointService", | ||
"address": "http://127.0.0.1:9008/symbolpoint", | "address": "http://127.0.0.1:9008/symbolpoint", | ||
" | "serviceMode": "Wcf" | ||
} | } | ||
] | ] | ||
| Line 74: | Line 78: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Replace the example address with the actual GDK4 SOAP endpoint. <code> | Replace the example address with the actual GDK4 SOAP endpoint. If the effective endpoint has no <code>binding</code>, it uses the top-level binding (normally <code>BasicHttp</code>). In a local override, use <code>"binding": "[binding]"</code> to restore top-level inheritance if the base endpoint specifies a binding. Set <code>binding</code> to a name such as <code>BasicHttps</code> if your deployment needs a different one. Restart MariaApplication. For legacy server options, see [[Service configuration#SymbolPointSettings|legacy SymbolPoint settings]]. | ||
== Connect GeoObjectTileServer to SymbolPoint == | |||
Set these values under <code>HostedServices.GeoObjectTiles.Settings</code> for MariaServiceHoster, or under <code>Settings</code> for standalone GeoObjectTileServer: | |||
<syntaxhighlight lang="json"> | |||
{ | |||
"SymbolPointServiceUri": "http://127.0.0.1:5110/symbolpoint", | |||
"SymbolPointServiceMode": "Http" | |||
} | |||
</syntaxhighlight> | |||
Use <code>Wcf</code> with the legacy SOAP address to select WCF. GeoObjectTileServer does not support <code>InProcess</code>. WCF is the default when no mode is specified. If an older configuration uses <code>SymbolPointHttpServiceUri</code>, it still selects HTTP when the mode is omitted. To migrate, move that address to <code>SymbolPointServiceUri</code> and set the mode to <code>Http</code>. | |||
== Connect third-party applications == | == Connect third-party applications == | ||
| Line 80: | Line 97: | ||
Third-party applications can call the GDK5 service over HTTP without installing the GDK client libraries. Use the published <code>/symbolpoint</code> base URL: | Third-party applications can call the GDK5 service over HTTP without installing the GDK client libraries. Use the published <code>/symbolpoint</code> base URL: | ||
* '''Get a PNG:''' <code>GET /symbolpoint/web/app6c/SFSPXM----*****?maxSize=64&crop=true</code>. The response body is <code>image/png</code>; the <code>Symbol-Info</code> header contains JSON metadata, including the anchor and bounds. For Delta SIDCs, use <code>/web/app6d/{sidc}</code>. | * '''Get a PNG:''' <code>GET /symbolpoint/web/app6c/SFSPXM----*****?maxSize=64&crop=true</code>. The response body is <code>image/png</code>; the <code>Symbol-Info</code> header contains JSON metadata, including the anchor and bounds. An unavailable symbol returns HTTP 404. For Delta SIDCs, use <code>/web/app6d/{sidc}</code>; for a named product, use <code>/web/getsymbol/{product}/{symbol}</code>. | ||
* '''Render a batch:''' Send <code>POST /symbolpoint/api/v1/symbols/render</code> with <code>Content-Type: application/json</code> and the body below. The response includes a state and metadata for each returned symbol; <code>ImageData</code> is a base64-encoded PNG. Check the symbol state, not just the HTTP status. See <code>/symbolpoint/swagger/index.html</code> for the full API. | * '''List installed products:''' Send <code>POST /symbolpoint/api/v1/products/query</code> with an empty JSON object (<code>{}</code>) to list all products. | ||
* '''Render a batch:''' Send <code>POST /symbolpoint/api/v1/symbols/render</code> with <code>Content-Type: application/json</code> and the body below. The response includes a state and metadata for each returned symbol; <code>ImageData</code> is a base64-encoded PNG when present. Check the symbol state, not just the HTTP status. Set <code>PreserveRequestSequenceInResponse</code> to <code>true</code> when you need one result per input position, including failures. See <code>/symbolpoint/swagger/index.html</code> for the full API. | |||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
{ | { | ||
"PreserveRequestSequenceInResponse": true, | |||
"Symbols": [ | "Symbols": [ | ||
{ | { | ||
| Line 94: | Line 113: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
When calling the render endpoint directly, limit each batch to 128 symbols, 16 million requested pixels (the sum of each <code>MaxSymbolSize</code> squared), and 256 KiB of JSON. Each symbol requires a <code>MaxSymbolSize</code> from 1 to 1024 and at most 64 layers. Split larger batches into multiple requests. | |||
For an existing GDK4 deployment, use its <code>/symbolpoint/web/...</code> routes for PNGs or its SOAP/WCF endpoint for managed operations. The GDK5 <code>/api/v1</code> requests do not work against GDK4. | For an existing GDK4 deployment, use its <code>/symbolpoint/web/...</code> routes for PNGs or its SOAP/WCF endpoint for managed operations. The GDK5 <code>/api/v1</code> requests do not work against GDK4. | ||
| Line 134: | Line 155: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
The client checks service readiness on its first request. Reuse the client across requests and dispose it when done. | The client checks service readiness on its first request. Reuse the client across requests and dispose it when done. The managed client splits large batches across requests and appends the results in order; individual specs must still meet the server limits. Check each result's <code>State</code>: <code>Partial</code> is not a complete render, and <code>Failed</code> must not be treated as a successful render, even if it includes a placeholder image. Product roots are configured on the server, not through the client. | ||
Windows applications already using the GDK <code>ISymbolPointServiceClient</code> abstraction can instead call <code>new SymbolPointServiceFactory().NewHttp(endpointUri)</code> from the <code>TPG.GDK.Windows.SymbolPoint.ServiceClient</code> namespace to keep that interface. Both client options target the GDK5 HTTP API and do not fall back to WCF. | Windows applications already using the GDK <code>ISymbolPointServiceClient</code> abstraction can instead call <code>new SymbolPointServiceFactory().NewHttp(endpointUri)</code> from the <code>TPG.GDK.Windows.SymbolPoint.ServiceClient</code> namespace to keep that interface. Both client options target the GDK5 HTTP API and do not fall back to WCF. | ||
Latest revision as of 09:25, 2 December 2026
This page covers running SymbolPoint under MariaServiceHoster in Maria GDK 5.2 and connecting MariaApplication, GeoObjectTileServer, or third-party applications. The GDK5 server uses HTTP, not SOAP or gRPC. Existing GDK4 clients can continue to use their legacy service.
Run SymbolPoint under MariaServiceHoster
For general host configuration and deployment, see configuration, hosting and routing, and deployment. SymbolPoint is disabled by default. To enable it and load products, merge this into appSettings.ServiceSettings.Local.json beside the host executable:
{
"HostedServices": {
"SymbolPoint": {
"Settings": {
"Disabled": false,
"DataSources": [
{ "Path": "C:\\MariaData\\symbolpoint", "RecursionDepth": 1 }
]
}
}
}
}
Set Path to a directory the host can read. A depth of 1 is appropriate when each product folder, containing its own symcfg.json, is directly under that directory. Include the MilSymSVG product for military point symbols. Restart MariaServiceHoster and check the startup log for the loaded product names.
With the default routing, clients use the host's HTTP listener on port 5110 at /symbolpoint; the child listens on loopback port 5121. Check http://127.0.0.1:5110/symbolpoint/ready: HTTP 200 means at least one product loaded. When Swagger is enabled, browse to /symbolpoint/swagger/index.html on the same host.
How MariaApplication selects a SymbolPoint source
Set serviceMode on the SymbolPointService endpoint to select how MariaApplication renders symbols:
- InProcess: Use the integrated renderer and
symbolPointConfig.dataSourcesfrom the effective general configuration. At least one path must be configured and at least one symbol product must load. - Http: Use the GDK5 HTTP endpoint.
- Wcf: Use the legacy SOAP/WCF endpoint.
Keep the local search paths configured when switching modes; explicit Http and Wcf ignore them. If serviceMode is omitted, MariaApplication uses the integrated renderer when local paths are configured and WCF otherwise. The selection is made at startup, with no automatic fallback.
Upgrading to 5.2
- Keeping a legacy server: Existing SOAP clients can keep their code, endpoint address, and WCF binding. The 5.2 configuration loader ignores
bindingRef. An old"bindingRef": "[binding]"can be left in place or removed; the endpoint inherits the top-levelbindingunless it supplies its own. If an endpoint previously relied on the default binding without inheriting the top-level one, set its intendedbindingexplicitly. - Switching to the GDK5 server: Set
serviceModetoHttpand update the endpoint address. Anhttp://orhttps://address alone does not select the new API. A custom SOAP client must switch to an HTTP client; changing only its URL is not enough. - Replacing preview configuration: For SymbolPoint, replace
symbolPointConfig.httpServiceUrior abindingRef-based HTTP example with the named endpoint below. If a configuration contains"binding": "RestApi", remove that value and use"serviceMode": "Http"for the applicable HTTP endpoint. Code that usedBindingType.RestApiwith a mode-aware client factory usesGdkServiceMode.Httpinstead.
Connect MariaApplication to GDK5 HTTP
Add or update the following entry in ClientServiceConfiguration.local.json:
{
"endpoints": [
{
"name": "SymbolPointService",
"address": "http://127.0.0.1:5110/symbolpoint",
"serviceMode": "Http"
}
]
}
For a remote deployment, use its published scheme, host, and port. Use the service base URL ending in /symbolpoint, not a /web or /api/v1 endpoint. The endpoints array merges by name. With "serviceMode": "Http", any inherited WCF binding is unused.
Place each .local.json beside its active base file. MariaApplication looks in %LocalAppData%\TeleplanGlobe\MariaGDK first, then in the application folder. When running from source, local override files in the MariaApplication project directory are ignored by Git and copied to the application output on build. Restart MariaApplication after changing the effective configuration.
GDK5 renders PNG and SVG symbol products. It also accepts APP-6C/2525C codes with an unambiguous single-point mapping, using Delta artwork from MilSymSVG. It does not render GDK4 WPF artwork or multipoint graphics. Keep the legacy service if you need its original artwork.
Connect MariaApplication to legacy GDK4 WCF
Set serviceMode to Wcf and set the endpoint address to your legacy service:
{
"endpoints": [
{
"name": "SymbolPointService",
"address": "http://127.0.0.1:9008/symbolpoint",
"serviceMode": "Wcf"
}
]
}
Replace the example address with the actual GDK4 SOAP endpoint. If the effective endpoint has no binding, it uses the top-level binding (normally BasicHttp). In a local override, use "binding": "[binding]" to restore top-level inheritance if the base endpoint specifies a binding. Set binding to a name such as BasicHttps if your deployment needs a different one. Restart MariaApplication. For legacy server options, see legacy SymbolPoint settings.
Connect GeoObjectTileServer to SymbolPoint
Set these values under HostedServices.GeoObjectTiles.Settings for MariaServiceHoster, or under Settings for standalone GeoObjectTileServer:
{
"SymbolPointServiceUri": "http://127.0.0.1:5110/symbolpoint",
"SymbolPointServiceMode": "Http"
}
Use Wcf with the legacy SOAP address to select WCF. GeoObjectTileServer does not support InProcess. WCF is the default when no mode is specified. If an older configuration uses SymbolPointHttpServiceUri, it still selects HTTP when the mode is omitted. To migrate, move that address to SymbolPointServiceUri and set the mode to Http.
Connect third-party applications
Third-party applications can call the GDK5 service over HTTP without installing the GDK client libraries. Use the published /symbolpoint base URL:
- Get a PNG:
GET /symbolpoint/web/app6c/SFSPXM----*****?maxSize=64&crop=true. The response body isimage/png; theSymbol-Infoheader contains JSON metadata, including the anchor and bounds. An unavailable symbol returns HTTP 404. For Delta SIDCs, use/web/app6d/{sidc}; for a named product, use/web/getsymbol/{product}/{symbol}. - List installed products: Send
POST /symbolpoint/api/v1/products/querywith an empty JSON object ({}) to list all products. - Render a batch: Send
POST /symbolpoint/api/v1/symbols/renderwithContent-Type: application/jsonand the body below. The response includes a state and metadata for each returned symbol;ImageDatais a base64-encoded PNG when present. Check the symbol state, not just the HTTP status. SetPreserveRequestSequenceInResponsetotruewhen you need one result per input position, including failures. See/symbolpoint/swagger/index.htmlfor the full API.
{
"PreserveRequestSequenceInResponse": true,
"Symbols": [
{
"ProductId": "app6c",
"SymbolLayerIds": ["SFSPXM----*****"],
"MaxSymbolSize": 64
}
]
}
When calling the render endpoint directly, limit each batch to 128 symbols, 16 million requested pixels (the sum of each MaxSymbolSize squared), and 256 KiB of JSON. Each symbol requires a MaxSymbolSize from 1 to 1024 and at most 64 layers. Split larger batches into multiple requests.
For an existing GDK4 deployment, use its /symbolpoint/web/... routes for PNGs or its SOAP/WCF endpoint for managed operations. The GDK5 /api/v1 requests do not work against GDK4.
Connect from .NET with SymbolPointHttpClient
Reference the GDK5 TPG.GDK.CommonCore.SymbolPoint.Client library in a .NET 8 or later application. The client does not require WCF, Windows-specific GDK libraries, or MariaApplication configuration files. Pass the published SymbolPoint base URL, ending in /symbolpoint, directly to the client. The example uses the default MariaServiceHoster port and renders one of the APP-6C symbols described above; the server must have the MilSymSVG product loaded.
using System;
using System.IO;
using TPG.GDK.CommonCore.SymbolPoint.Client;
using TPG.Proto3.SymbolPoint;
using var client = new SymbolPointHttpClient(
new Uri("http://127.0.0.1:5110/symbolpoint"));
var request = new SymbolsRenderSpec
{
Symbols =
{
new SymbolRenderSpec
{
ProductId = "app6c",
SymbolLayerIds = { "SFSPXM----*****" },
MaxSymbolSize = 64
}
}
};
var result = await client.GetSymbolsAsync(request);
if (result is null || result.Symbols.Count == 0)
throw new InvalidOperationException("No SymbolPoint response was returned.");
var symbol = result.Symbols[0];
if (symbol.State != SymbolData.Types.SymbolState.Ok)
throw new InvalidOperationException($"SymbolPoint render state: {symbol.State}");
await File.WriteAllBytesAsync("symbol.png", symbol.ImageData.ToByteArray());
The client checks service readiness on its first request. Reuse the client across requests and dispose it when done. The managed client splits large batches across requests and appends the results in order; individual specs must still meet the server limits. Check each result's State: Partial is not a complete render, and Failed must not be treated as a successful render, even if it includes a placeholder image. Product roots are configured on the server, not through the client.
Windows applications already using the GDK ISymbolPointServiceClient abstraction can instead call new SymbolPointServiceFactory().NewHttp(endpointUri) from the TPG.GDK.Windows.SymbolPoint.ServiceClient namespace to keep that interface. Both client options target the GDK5 HTTP API and do not fall back to WCF.