Comments (3)
Not a great solution but for now to get us pass this issue we decided to implement a fix in our post processing when converting the feature into a rowset.
@Override
public Object[] next()
{
Feature feature = featureIterator.next();
Object[] row = new Object[properties.size()];
for (int i = 0; i < properties.size(); i++)
{
Object value = feature.getProperty(properties.get(i)).getValue();
if (value instanceof ArrayList)
{
value = StringUtils.join((ArrayList) value, ",");
}
else if (value instanceof String && ((String) value).startsWith("[") && ((String) value).endsWith("]"))
{
value = StringUtils.join(new JSONArray((String) value).iterator(), ",");
}
row[i] = value;
}
return row;
}
One thing to point out when we disable the CSV all of or numeric arrays come back as ArrayList but our String arrays come back as String. Which is why we needed to add the 'else if' portion. Maybe this is a result of how we are indexing the data within ElasticSearch?
from elasticgeo.
Yeah array handling for CSV/GML output has gone through a few iterations in the plugin and the current implementation is still not ideal. Originally array encoding was implemented as a string-join but that caused errors for numeric arrays when outputting GML (and maybe CSV), as I think you've encountered. Let me know if you think you have an approach that would make more sense on the plugin-side for this.
The default (non-CSV) encoding will return the actual array and is suitable for GeoJSON output if you can consume that. This could also be used in the case where you're programmatically accessing features as you'll get the property back as an array directly.
from elasticgeo.
Yeah the non-CSV encoding is actually preferred. We need CSV for now so our code is consistent when switching between databases. At some point we should probably make the switch. The change on our side is sufficient to get our ITs passing.
from elasticgeo.
Related Issues (20)
- missing username and password input HOT 2
- Cannot restart Geoserver after installation on Windows Server 2018 HOT 2
- Cannot connect to store (Bonsai - Hosted Elasticsearch) HOT 13
- Support for ElasticSearch 7.0 HOT 1
- NPE on basic usage HOT 4
- [Question] Native query using terms filter HOT 4
- Can elasticgeo support sliced scroll-scan? HOT 4
- Ignoring Attribute Configuration
- Map tile failing when processing multiple simultaneous WMS requests
- sort the layer result from elasticsearch HOT 1
- WFS FeatureID query values HOT 2
- GS 2.19 Clean install view layers issue
- Intermittent error that requires us to restart Geoserver HOT 1
- Point Cluster
- Geohash aggregation when there's no buckets
- Opensearch support 2.X HOT 1
- Highlighting Support
- Unable to retrieve Elastic data by using GeoServer CQL Filters HOT 1
- geojson is being rounded HOT 4
- Elastic search aggregations through view params not working HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticgeo.