AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.util.GeoJSONUtil Class Reference

Static Public Member Functions

static MapFactory.MapFeature processGeoJSONFeature (final String logTag, final MapFactory.MapFeatureContainer container, final YailList descriptions)
 
static List< YailListgetGeoJSONFeatures (final String logTag, final String content) throws JSONException
 
static String getGeoJSONType (final String content, final String geojsonType) throws JSONException
 
static void writeFeaturesAsGeoJSON (List< MapFactory.MapFeature > featuresToSave, String path) throws IOException
 
static YailList swapCoordinates (YailList coordinates)
 
static< E > List< List< E > > swapCoordinates2 (List< List< E >> coordinates)
 
static LList swapNestedCoordinates (LList coordinates)
 

Detailed Description

Utility class to process data from GeoJSON.

Author
ewpat.nosp@m.ton@.nosp@m.mit.e.nosp@m.du (Evan W. Patton)

Definition at line 46 of file GeoJSONUtil.java.

Member Function Documentation

◆ getGeoJSONFeatures()

static List<YailList> com.google.appinventor.components.runtime.util.GeoJSONUtil.getGeoJSONFeatures ( final String  logTag,
final String  content 
) throws JSONException
static

Definition at line 453 of file GeoJSONUtil.java.

◆ getGeoJSONType()

static String com.google.appinventor.components.runtime.util.GeoJSONUtil.getGeoJSONType ( final String  content,
final String  geojsonType 
) throws JSONException
static

Definition at line 463 of file GeoJSONUtil.java.

◆ processGeoJSONFeature()

static MapFactory.MapFeature com.google.appinventor.components.runtime.util.GeoJSONUtil.processGeoJSONFeature ( final String  logTag,
final MapFactory.MapFeatureContainer  container,
final YailList  descriptions 
)
static

Definition at line 278 of file GeoJSONUtil.java.

◆ swapCoordinates()

static YailList com.google.appinventor.components.runtime.util.GeoJSONUtil.swapCoordinates ( YailList  coordinates)
static

App Inventor stores values latitude, longitude, so swap the coordinate order when reading GeoJSON.

Parameters
coordinatesA YailList of coordinates.
Returns
coordinates, with its lat and long swapped.

Definition at line 789 of file GeoJSONUtil.java.

◆ swapCoordinates2()

static <E> List<List<E> > com.google.appinventor.components.runtime.util.GeoJSONUtil.swapCoordinates2 ( List< List< E >>  coordinates)
static

Definition at line 803 of file GeoJSONUtil.java.

◆ swapNestedCoordinates()

static LList com.google.appinventor.components.runtime.util.GeoJSONUtil.swapNestedCoordinates ( LList  coordinates)
static

Definition at line 812 of file GeoJSONUtil.java.

◆ writeFeaturesAsGeoJSON()

static void com.google.appinventor.components.runtime.util.GeoJSONUtil.writeFeaturesAsGeoJSON ( List< MapFactory.MapFeature >  featuresToSave,
String  path 
) throws IOException
static

Definition at line 760 of file GeoJSONUtil.java.


The documentation for this class was generated from the following file: