I have a javapairRDD in below format
org.apache.spark.api.java.JavaPairRDD[com.vividsolutions.jts.geom.Geometry,com.vividsolutions.jts.geom.Geometry]
Key is a polygon and value is a point in the polygon
eg:
[(polygon(1,2,3,4), POINT (-80.0140735758427 40.43926684782609) )]
How to I transform this javapairRDD
to Dataframe
with three columns ?
df: String, double, double
Here my first column will be a polygon, second column as longitude and third column as latitude
Any help will be appreciated
below solution worked
javapairrddvariable.rdd.toDF()