Skip to main content



      Home
Home » Eclipse Projects » Eclipse Titan » TTCN-3 typing for RFC 7946 (GeoJSON)(GeoJSON TTCN-3)
TTCN-3 typing for RFC 7946 (GeoJSON) [message #1841531] Thu, 20 May 2021 03:53 Go to next message
Eclipse UserFriend
Good morning All,

Does anyone already do complete or partial TTCN-3 typing for RFC 7946 (GeoJSON)? I need the Polygon typing.
Here is what I did (my proposal) but I would like to get your feedback.
Thanks a lot
Yann

  type record Geometry {
    JSON.String type_,
    Coordinates coordinates
  } with {
    variant (type_) "name as 'type'";
  }
  type record of JSON.Number Coordinate;
  type record of Coordinate Coordinates;
  type record Property {
    JSON.String key,
    JSON.String value_
  } with {
    variant (value_) "name as 'value'";
  }
  type record of Property Properties;
  type record Polygon {
    JSON.String type_,
    Geometry geometry,
    Properties properties,
    JSON.String this
  } with {
    variant (type_) "name as 'type'";
  }
Re: TTCN-3 typing for RFC 7946 (GeoJSON) [message #1841532 is a reply to message #1841531] Thu, 20 May 2021 04:24 Go to previous messageGo to next message
Eclipse UserFriend
I should check it.

But as a quick review, according to the RFC7946 the Polygon has 3 members: type, coordinates and an optional bbox.

As I see there are JSON schemas for the types here: https://github.com/geojson/schema

I'll try them to translate to TTCN type definitions
Re: TTCN-3 typing for RFC 7946 (GeoJSON) [message #1841538 is a reply to message #1841532] Thu, 20 May 2021 04:49 Go to previous messageGo to next message
Eclipse UserFriend
Hello Gábor,

Thanks a lot
Yann
Re: TTCN-3 typing for RFC 7946 (GeoJSON) [message #1841544 is a reply to message #1841538] Thu, 20 May 2021 05:57 Go to previous messageGo to next message
Eclipse UserFriend
I translated the GEO Json schema to the attached TTCN type definitions.
It uses the type definitions from https://gitlab.eclipse.org/eclipse/titan/titan.ProtocolModules.JSON_v07_2006

  • Attachment: GEOJson.ttcn
    (Size: 3.01KB, Downloaded 91 times)
Re: TTCN-3 typing for RFC 7946 (GeoJSON) [message #1841545 is a reply to message #1841544] Thu, 20 May 2021 06:10 Go to previous messageGo to next message
Eclipse UserFriend
Hello Gábor,

Many thanks for your fast response, appreciate it ;)

Yann
Re: TTCN-3 typing for RFC 7946 (GeoJSON) [message #1842009 is a reply to message #1841545] Mon, 07 June 2021 04:02 Go to previous message
Eclipse UserFriend
Just a follow up question: The definition is working for you?
Previous Topic:Error when installing TITAN on windows10
Next Topic:RAW decoding with variant "TAG" doesn't work
Goto Forum:
  


Current Time: Mon Mar 10 21:50:33 EDT 2025

Powered by FUDForum. Page generated in 0.02858 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top