/webportal/src/main/java/au/org/emii/portal/util/GeoJSONUtilities.java

http://alageospatialportal.googlecode.com/ · Java · 41 lines · 20 code · 10 blank · 11 comment · 0 complexity · 443c02c9d4f1b435b18464afe89b2fd4 MD5 · raw file

  1. /*
  2. * Interface for GeoJSONUtilities
  3. *
  4. * used to parse the geojson and extract some
  5. * metadata about the layer
  6. */
  7. package au.org.emii.portal.util;
  8. import au.org.emii.portal.net.HttpConnection;
  9. import net.sf.json.JSONObject;
  10. /**
  11. *
  12. * @author brendon
  13. */
  14. public interface GeoJSONUtilities {
  15. //possible feature types
  16. public static final int FEATURE = 0;
  17. public static final int FEATURECOLLECTION = 1;
  18. public static final int POINT = 2;
  19. public static final int LINESTRING = 3;
  20. public static final int POLYGON = 4;
  21. public static final int MULTIPOINT = 5;
  22. public static final int MULTILINESTRING = 6;
  23. public static final int MULTIPOLYGON = 7;
  24. public static final int GEOMETRYCOLLECTION = 8;
  25. public HttpConnection getHttpConnection();
  26. public void setHttpConnection(HttpConnection httpConnection);
  27. public int getFirstFeatureType(JSONObject obj);
  28. public String getFirstFeatureValue(JSONObject obj, String key);
  29. public String getJson(String url);
  30. public int type(String type);
  31. }