Comments (1)
GeoSpark now only supports reading shapes (in shx) and attributes (in dbf) from shapefiles (including shx and dbf) and doesn't support writing data back to shapefile. However, GeoSpark can write data to WKT and GeoJSON.
- After successfully loading shapefile into GeoSpark, every SpatialRDD has a method called SaveAsGeoJSON. You can call it like this:
myPointRDD.SaveAsGeoJSON(Disk/HDFS/OtherLocation);
GeoSpark JavaDoc has specified all APIs in GeoSpark: http://www.public.asu.edu/~jiayu2/geospark/javadoc/0.8.1/
- After successfully loading shapefile into GeoSpark, non-spatial attributes from DBF are merged to one big String and stored in UserData in each Spatial Object of SpatialRDD.
The RDD looks like this:
coordinate\tPhone1\tCountry1
coordinate\tPhone2\tCountry2
coordinate\tPhone3\tCountry3
coordinate\tPhone4\tCountry4
For example, after the loading, I want to filter out the objects that contain "phoneNumber:1234". The pseudo code is like this:
JavaRDD<Point> newSpatialRDD = myPointRDD.rawSpatialRDD.filter(
new FilterFunction(String s)
{
List<String> attributes = s.split("\t");
// Use "Tab" character to split the attributes because we merge them into one String
if(attributes[0].contains("1234"))
{
return true;
}
else
{
return false;
}
}));
from sedona.
Related Issues (20)
- Sedona website `latest-snapshot` page has a warning message saying it's not the latest snapshot
- Sedona website right sidebar menu is missing the title
- Unable to read GeoJson with Polygons and Multipolygons HOT 2
- H3 functions missing methods on Databricks: `java.lang.NoSuchMethodError: com.uber.h3core.H3Core...` HOT 5
- RS_AsBase64 returns empty string HOT 3
- Request for addition of function: `ST_LineLocatePoint` HOT 6
- rs_setbandnodatavalue not working as expected HOT 2
- Error reading file greater than 2GB HOT 1
- Installing apache-sedona Python package does not install all dependencies (Sedona 1.5.0) HOT 2
- [Feature] Add ST_IsValidDetail as built-in function.
- 1.5.0 spark shaded protobuf version conflict with application HOT 2
- Support of 3D?
- Feature request: ST_Snap HOT 1
- Microsoft Fabric HOT 32
- Apache Sedona backend for Ibis project?
- Save / Load indexed spatial & partitioned Rdd HOT 2
- Clarify SedonaUtils documentation HOT 1
- Write a geotiff raster , but just found _SUCCESS file in output HDFS dir HOT 3
- Noisy warnings on optional imports
- Map RDD and GeometryType (not an instance of type GeometryType()) HOT 2
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 sedona.