| java.lang.Object | |
| ↳ | com.steerpath.sdk.utils.GeoJsonHelper |
Helpers and utils for Features and GeoJson.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static String | getAssetTrackingId(JSONObject json) | ||||||||||
| static String | getBuildingReference(JSONObject json) | ||||||||||
| static double | getCenter(JSONObject json, double defaultValue, int indexOnCoordinates) | ||||||||||
| static double | getCoordinate(JSONObject json, double defaultValue, int indexOnCoordinates) | ||||||||||
| static double | getCoordinateFromMapboxGeoJson(JSONObject json, double defaultValue, int indexOnCoordinates) | ||||||||||
| static String | getCssClass(JSONObject json) | ||||||||||
| static String | getDescription(JSONObject json) | ||||||||||
| static JSONArray |
getFeatures(JSONObject json)
Convenience method for hiding try-catch.
| ||||||||||
| static LatLng |
getFirstLatLng(JSONObject geometry)
Returns first LatLng from array of geometry coordinates.
| ||||||||||
| static int | getFloor(JSONObject json, int defaultValue) | ||||||||||
| static String | getFloor(JSONObject json) | ||||||||||
| static int[] | getFloorIndexList(JSONObject json) | ||||||||||
| static String[] | getFloorNameList(JSONObject json) | ||||||||||
| static JSONArray | getFloors(JSONObject json) | ||||||||||
| static String | getGeoJsonType(JSONObject json) | ||||||||||
| static String | getGeometryJson(JSONObject json) | ||||||||||
| static String | getIconUrl(JSONObject json) | ||||||||||
| static String | getId(JSONObject json) | ||||||||||
| static ArrayList<String> | getKeywordList(JSONObject json) | ||||||||||
| static String[] | getKeywords(JSONObject json) | ||||||||||
| static double | getLatitude(JSONObject json, double defaultValue) | ||||||||||
| static double | getLatitudeFromMapboxGeoJson(JSONObject json, double defaultValue) | ||||||||||
| static String | getLocalRef(JSONObject json) | ||||||||||
| static double | getLongitude(JSONObject json, double defaultValue) | ||||||||||
| static double | getLongitudeFromMapboxGeoJson(JSONObject json, double defaultValue) | ||||||||||
| static double | getNaturalOrientation(JSONObject json) | ||||||||||
| static String | getOptional(JSONObject json) | ||||||||||
| static double | getPoint(JSONObject json, double defaultValue, int indexOnCoordinates) | ||||||||||
| static JSONObject |
getPolygonJson(MetaFeature feature, JSONObject rootJson)
Finds Feature's GeoJson from given root json.
| ||||||||||
| static String | getSubType(JSONObject json) | ||||||||||
| static String[] | getTags(JSONObject json) | ||||||||||
| static ArrayList<String> | getTagsList(JSONObject json) | ||||||||||
| static String | getTitle(JSONObject json) | ||||||||||
| static boolean |
hasArea(JSONObject json)
Checks if json has "area" attribute on it and returns 1 for true and 0 for false.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Convenience method for hiding try-catch.
| json | is expected to be FeatureCollection |
|---|
Returns first LatLng from array of geometry coordinates.
Finds Feature's GeoJson from given root json. Extracts and returns "properties/area/coordinates" json.
| feature | target Feature to find |
|---|---|
| rootJson | GeoJson to search from |
Checks if json has "area" attribute on it and returns 1 for true and 0 for false.