Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:53 Go to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 145
Registered: June 2016
Senior Member
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 08:24 Go to previous messageGo to next message
Gábor Szalai is currently offline Gábor SzalaiFriend
Messages: 134
Registered: December 2015
Senior Member
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 08:49 Go to previous messageGo to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 145
Registered: June 2016
Senior Member
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 09:57 Go to previous messageGo to next message
Gábor Szalai is currently offline Gábor SzalaiFriend
Messages: 134
Registered: December 2015
Senior Member
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 75 times)
Re: TTCN-3 typing for RFC 7946 (GeoJSON) [message #1841545 is a reply to message #1841544] Thu, 20 May 2021 10:10 Go to previous messageGo to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 145
Registered: June 2016
Senior Member
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 08:02 Go to previous message
Gábor Szalai is currently offline Gábor SzalaiFriend
Messages: 134
Registered: December 2015
Senior Member
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: Fri Oct 04 21:21:16 GMT 2024

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

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

Back to the top