------------------------------------
Jia Yu,
Ph.D. Student in Computer Science
Reach me via Jia Yu's Homepage | GitHub Repositories
--I looked at this example: http://datasystemslab.github.io/GeoSpark/api/sql/GeoSparkSQL-Constructor/, I would expect the the fields of _c1, _c2...for the feature such asREGION, GEOID, .... in the dataframe, why does it just give the 'rddshape'? How can I get a dataframe including all the feature fields? The shape file I used is from https://catalog.data.gov/dataset/tiger-line-shapefile-2017-nation-u-s-current-state-and-equivalent-national.
Enter code here...
String shapefileInputLocation = "...\tl_2017_us_state.shp";
JavaSparkContext jsc = new JavaSparkContext(spark.sparkContext());
SpatialRDD<Geometry> spatialRDD = new SpatialRDD<Geometry>();
spatialRDD.rawSpatialRDD = ShapefileReader.readToGeometryRDD(jsc, shapefileInputLocation);
//spark.udf().register("test", new FeaturePolygon(), DataTypes.)
Geometry g = spatialRDD.rawSpatialRDD.first();
System.out.println("======++" + g.toString().substring(g.toString().length() - 300));
//if (true) System.exit(1);
Dataset<Row> shapefileDf = Adapter.toDf(spatialRDD, spark);
sharefileDf.show();
You received this message because you are subscribed to the Google Groups "GeoSpark Discussion Board" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geospark-discussio...@googlegroups.com.
To post to this group, send email to geospark-dis...@googlegroups.com.
Visit this group at https://groups.google.com/group/geospark-discussion-board.
To view this discussion on the web visit https://groups.google.com/d/msgid/geospark-discussion-board/b73338d5-668b-482d-984d-85a303bab24c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.