public class FeatureToJson extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_FEATURES |
| Constructor and Description |
|---|
FeatureToJson(boolean arrays,
boolean edit) |
FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
boolean aliases,
List<Long> attributesToInclude) |
FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
List<Long> attributesToInclude) |
| Modifier and Type | Method and Description |
|---|---|
org.json.JSONArray |
getJSONFeatures(ApplicationLayer al,
SimpleFeatureType ft,
org.geotools.data.FeatureSource fs,
org.geotools.data.Query q,
String sort,
String dir)
Get the features as JSONArray with the given params
|
static org.opengis.filter.Filter |
reformatFilter(org.opengis.filter.Filter filter,
SimpleFeatureType ft)
Optimze and reformat filter.
|
static org.opengis.filter.Filter |
reformatFilter(org.opengis.filter.Filter filter,
SimpleFeatureType ft,
boolean includeRelations)
Optimze and reformat filter.
|
public static final int MAX_FEATURES
public FeatureToJson(boolean arrays,
boolean edit)
public FeatureToJson(boolean arrays,
boolean edit,
boolean graph,
List<Long> attributesToInclude)
public org.json.JSONArray getJSONFeatures(ApplicationLayer al, SimpleFeatureType ft, org.geotools.data.FeatureSource fs, org.geotools.data.Query q, String sort, String dir) throws IOException, org.json.JSONException, Exception
al - The application layer(if there is a application layer)ft - The featuretype that must be used to get the featuresfs - The featureSourceq - The querysort - The attribute name that is used to sortdir - Sort direction (DESC or ASC)IOException - if anyorg.json.JSONException - if transforming to json failsException - if anypublic static org.opengis.filter.Filter reformatFilter(org.opengis.filter.Filter filter,
SimpleFeatureType ft)
throws Exception
reformatFilter(org.opengis.filter.Filter, nl.b3p.viewer.config.services.SimpleFeatureType, boolean)
with the includeRelations set to true.filter - the filter to processft - featuretype to apply filterException - if anyreformatFilter(org.opengis.filter.Filter,
nl.b3p.viewer.config.services.SimpleFeatureType, boolean)public static org.opengis.filter.Filter reformatFilter(org.opengis.filter.Filter filter,
SimpleFeatureType ft,
boolean includeRelations)
throws Exception
filter - the filter to processft - featuretype to apply filterincludeRelations - whether to include related (joined) dataException - if anyCopyright © 2018. All rights reserved.