All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.evrythng.thng.resource.model.store.geojson.GeoJson Maven / Gradle / Ivy

There is a newer version: 1.33
Show newest version
package com.evrythng.thng.resource.model.store.geojson;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;

/**
 * Represents the characteristics of a GeoJSON coordinate
 */
public abstract class GeoJson implements Serializable {

	private static final long serialVersionUID = 5457609690934037806L;
	static final int LON_IDX = 0;
	static final int LAT_IDX = 1;
	public static final String FIELD_TYPE = "type";
	public static final String FIELD_COORDINATES = "coordinates";
	private GeoJsonType type;

	protected GeoJson(final GeoJsonType type) {

		this.type = type;
	}

	public String getType() {

		return type.toString();
	}

	@JsonIgnore
	public GeoJsonType getGeoJsonType() {

		return type;
	}

	@Override
	public String toString() {

		return "GeoJson [type=" + type + "]";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy