NGWUtil

public class NGWUtil

Fields

NGWKEY_CLS

public static String NGWKEY_CLS

NGWKEY_DATATYPE

public static String NGWKEY_DATATYPE

NGWKEY_DAY

public static String NGWKEY_DAY

NGWKEY_DESCRIPTION

public static String NGWKEY_DESCRIPTION

NGWKEY_DISPLAY_NAME

public static String NGWKEY_DISPLAY_NAME

NGWKEY_EXTENSIONS

public static String NGWKEY_EXTENSIONS

NGWKEY_FEATURE_COUNT

public static String NGWKEY_FEATURE_COUNT

NGWKEY_FIELDS

public static String NGWKEY_FIELDS

NGWKEY_GEOM

public static String NGWKEY_GEOM

NGWKEY_GEOMETRY_TYPE

public static String NGWKEY_GEOMETRY_TYPE

NGWKEY_HOUR

public static String NGWKEY_HOUR

NGWKEY_ID

public static String NGWKEY_ID

NGWKEY_KEYNAME

public static String NGWKEY_KEYNAME

NGWKEY_MIME

public static String NGWKEY_MIME

NGWKEY_MINUTE

public static String NGWKEY_MINUTE

NGWKEY_MONTH

public static String NGWKEY_MONTH

NGWKEY_NAME

public static String NGWKEY_NAME

NGWKEY_PARENT

public static String NGWKEY_PARENT

NGWKEY_PASSWORD

public static String NGWKEY_PASSWORD

NGWKEY_RESOURCE_GROUP

public static String NGWKEY_RESOURCE_GROUP

NGWKEY_SECOND

public static String NGWKEY_SECOND

NGWKEY_SRS

public static String NGWKEY_SRS

NGWKEY_VECTOR_LAYER

public static String NGWKEY_VECTOR_LAYER

NGWKEY_YEAR

public static String NGWKEY_YEAR

Methods

createNewGroup

public static HttpResponse createNewGroup(Context context, Connection connection, long parentId, String name)

createNewLayer

public static HttpResponse createNewLayer(Connection connection, VectorLayer layer, long parentId)

createNewResource

public static HttpResponse createNewResource(Context context, Connection connection, JSONObject json)

getConnectionCookie

public static String getConnectionCookie(AtomicReference<String> reference, String login, String password)

NGW API Functions

getExtent

public static String getExtent(String server, long remoteId)

getFeatureAttachmentUrl

public static String getFeatureAttachmentUrl(String server, long remoteId, long featureId)

getFeatureUrl

public static String getFeatureUrl(String server, long remoteId, long featureId)

Get one row from vector layer

Параметры:
  • server – URL
  • remoteId – resource id
  • featureId – row id
Результат:

URL to row

getFeaturesUrl

public static String getFeaturesUrl(String server, long remoteId)

Get the url to JSONArray of features (NOT GeoJSON!)

Параметры:
  • server – URL
  • remoteId – vector layer id
Результат:

URL

getFeaturesUrl

public static String getFeaturesUrl(String server, long remoteId, String where)

getFieldsFromJson

public static List<Field> getFieldsFromJson(JSONArray fieldsJSONArray)

getFileUploadUrl

public static String getFileUploadUrl(String server)

getGeoJSONUrl

public static String getGeoJSONUrl(String server, long remoteId)

GeoJSON URL. Get data as GeoJSON

Параметры:
  • server – URL to NextGIS Web server
  • remoteId – Vector layer resource id
Результат:

URL

getNgwVersion

public static Pair<Integer, Integer> getNgwVersion(Context context, String account)

getNgwVersion

public static Pair<Integer, Integer> getNgwVersion(String url, String login, String password)

getNgwVersionUrl

public static String getNgwVersionUrl(String server)

getResourceByKey

public static boolean getResourceByKey(Context context, INGWResource resource, Map<String, Resource> keys)

getResourceMetaUrl

public static String getResourceMetaUrl(String server, long remoteId)

The resource metadata (fields, geometry type, SRS, etc.)

Параметры:
  • server – URL
  • remoteId – resource id
Результат:

URL to resource meta

getResourceUrl

public static String getResourceUrl(String server, long remoteId)

Resource URL

Параметры:
  • server – URL
  • remoteId – resource id
Результат:

URL to resource

getTMSUrl

public static String getTMSUrl(String server, Long[] styleIds)

TMS URL for raster layer

Параметры:
  • server – URL
  • styleIds – Raster style ids
Результат:

URL to TMS for TMSLayer

getTrackedFeaturesUrl

public static String getTrackedFeaturesUrl(String server, long remoteId, long startDate)

jsonToFeatures

public static List<Feature> jsonToFeatures(JSONArray featuresJSONArray, List<Field> fields, int nSRS, IProgressor progressor)

readNGWFeature

public static Feature readNGWFeature(JsonReader reader, List<Field> fields, int nSRS)

readNGWFeatureFields

public static void readNGWFeatureFields(Feature feature, JsonReader reader, List<Field> fields)

signUp

public static boolean signUp(String server, String login, String password, String displayName, String description)