Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/se38/GeoJson
ABAP Classes to create GeoJson strings
https://github.com/se38/GeoJson
Last synced: about 1 month ago
JSON representation
ABAP Classes to create GeoJson strings
- Host: GitHub
- URL: https://github.com/se38/GeoJson
- Owner: se38
- License: mit
- Created: 2019-03-16T16:28:56.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-16T19:46:49.000Z (almost 4 years ago)
- Last Synced: 2024-08-02T19:01:54.971Z (5 months ago)
- Language: ABAP
- Size: 255 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- abap-florilegium - GeoJson
README
# GeoJSON
ABAP Classes to create GeoJSON strings according to [RFC 7946](https://tools.ietf.org/html/rfc7946) and display results with [LeafletJS](https://leafletjs.com).## Installation
Import Source with [abapGit](https://github.com/larshp/abapGit)## Required Packages
Needs [JSON Document Class](https://github.com/se38/zjson) with at least version 2.33
```
write:/ zcl_json_document=>get_version( ).
```
## Usage
This example will create a simple point object:
```
DATA(geojson) = NEW zcl_geojson( ).
DATA(point) = geojson->get_new_point(
i_latitude = CONV #( '49.29278417339369' )
i_longitude = CONV #( '8.64398717880249' )
).
geojson->add_feature( point ).
cl_demo_output=>display_json( geojson->get_json( ) ).
```
Result
```
{
"type":"FeatureCollection",
"features":
[
{
"type":"Feature",
"properties":
{
"popupContent":""
},
"geometry":
{
"type":"Point",
"coordinates":
[
8.6439871788025,
49.2927841733937
]
}
}
]
}
```More examples: see demo report ZGEOJSON_DEMO
![Result](GeoJSON.PNG "Result")
## License
This software is published under [MIT License](https://github.com/se38/GeoJson/blob/master/LICENSE)