node package manager

ramani

Ramani Maps-API, tools to consume the Ramani Cloud-services

Super simple to use

Ramani Maps-API is designed to be the simplest way possible to get service from Ramani Cloud.

var request = require('ramani');
ramani.init({
        username:'',
        apiKey:'',
        package:''
 });
 
ramani.getTransect([
  [49.14758022506841, 1.9720458984374998],
  [49.337651296668845, 3.5870361328124996]
  ],{
  layer: 'ddl.simS5seriesForAirQualityEuro.o3conc',
  info_format :'text/json'
  }, function(error, transect){
    console.log(transect);
});
 
 
ramani.getPoint([2.6092529296875,49.50916011935442], '2.1092529296875,49.00916011935442,3.1092529296875,50.00916011935442', {
 layer: 'ddl.simS5seriesForAirQualityEuro.o3conc',
 }, function(error, result){
  console.log(result['features'][0]['']);
});
 
ramani.getMetadata('ddl.simS5seriesForAirQualityEuro.o3conc', 
  { item:'dates' }
  , function(error, result){
  console.log(result);
}); 
 
 
 
//Get RSS-feed 
ramani.getMetadata('ddl.simS5seriesForAirQualityEuro.o3conc', 
  { item:'dates', info_format :'rss' }
  , function(error, result){
  console.log(result);
});
 
 
//store point 
var fields = { id : '1', name : 'pointA' }; 
ramani.storePoint('layerID', fields, [2.6092529296875,49.50916011935442], function(error, result){
    console.log(result);
});
 

Table of contents


GetMetadata

You can call this function to get metadata from the layer.

ramani.getMetadata(layerID, 
  params
  , function(error, result){
  console.log(result);
}); 

note :
layerID => Replace layerID with the string name of the ID of a layer of your choice. A valid string consist of a layerID/param combination. You can obtain the layer ID/param-combination from the Layer Information-widget as part of our Digital Data Library (DDL).

For more information about which parameters you can get follow this link.

back to top


GetTransect

ramani.getTransect(coordinatesArray, 
  params
  , function(error, result){
  console.log(result);
}); 

note : coordinatesArray is an Array list, consisting of two coordinates for a single line or multiple coordinates for several segments.

Example: For example, atmospheric ozone along a line (single or multiple segments) crossing a city.

back to top


GetPoint

ramani.getPoint(point, bbox, 
  params
  , function(error, result){
  console.log(result);
}); 

note : point is consisting of one coordinate and bbox is bounding box

back to top

GetFeatureInfo

ramani.getFeatureInfo(point, bbox, {
 layer: 'ddl.simS5seriesForAirQualityEuro.o3conc',
 info_format :'text/json',
 }, function(error, result){
  console.log(result);
});

note : point is consisting of one coordinate and bbox is bounding box

back to top

GetArea

ramani.getFeatureInfo(point, bbox, {
 layer: 'ddl.simS5seriesForAirQualityEuro.o3conc',
 info_format :'text/json',
 }, function(error, result){
  console.log(result);
});

note : point is consisting of one coordinate and bbox is bounding box

back to top

GetVerticleProfile

ramani.getVerticleProfile(point, parameters, callback);
 
//example  
ramani.getVerticleProfile(point, {
 layer: 'ddl.simS5seriesForAirQualityEuro.o3conc',
 info_format :'text/json',
 }, function(error, result){
  console.log(result);
});

note : point is consisting of one coordinate

back to top

GetTimeseriesProfile

ramani.getTimeseriesProfile(point, parameters, callback);
 
//example  
ramani.getTimeseriesProfile(point, {
 layer: 'ddl.simS5seriesForAirQualityEuro.o3conc',
 info_format :'text/json',
 }, function(error, result){
  console.log(result);
});

note : point is consisting of one coordinate

back to top

SqlApi

ramani.sqlApi(query, callback);
 
//example  
ramani.sqlApi("select * from table", function(error, result){
  console.log(result);
});

back to top

StorePoint

var fields = { id : '1', name : 'pointA' }; 
ramani.storePoint('layerID', fields, point, function(error, result){
    console.log(result);
});

note : point is consisting of one coordinate

back to top

StorePolygon

var fields = { id : '1', name : 'pointA' }; 
ramani.storePolygon('layerID', fields, coordinatesArray, function(error, result){
    console.log(result);
});

note : coordinatesArray is an Array list, consisting of two coordinates for a single line or multiple coordinates for several segments.

back to top

StoreLine

var fields = { id : '1', name : 'pointA' }; 
ramani.storeLine('layerID', fields, coordinatesArray, function(error, result){
    console.log(result);
});

note : coordinatesArray is an Array list, consisting of two coordinates for a single line or multiple coordinates for several segments.