Giter VIP home page Giter VIP logo

Comments (2)

jiayuasu avatar jiayuasu commented on May 22, 2024

@anto , have you successfully got a SpatialRDD using SpatialRDD constructor?

If so, please use

public boolean CRSTransform(String sourceEpsgCRSCode, String targetEpsgCRSCode)

to do CRSTransformation on your spatialRDD.

Pseudo code:

PointRDD myPointRDD = new PointRDD(...)
myPointRDD.CRSTransform("epsg:32722","epsg:4326")

After that, you can persist it onto disk.
Pseudo code to store as TSV:

myPointRDD.rawSpatialRDD.saveAsTextFile(...)

Pseudo code to store as GeoJSON:

myPointRDD.saveAsGeoJSON(...)

from sedona.

anto avatar anto commented on May 22, 2024

Hello jiayuasu,

Thanks a lot for the hints. I have been away so I am sorry that I could not respond back earlier.

I can indeed manage to load CSV file, convert EPSG and save it back into TSV file. The example of my results is as below:

CSV Input Data with EPSG: 32772
780530,9839470,783767
780710,9840510,22004

Conversion result to EPSG: 4326
POINT (-1.4509475921881358 -48.47896284047234)	780530,9839470,783767
POINT (-1.4415458115407216 -48.47735667412911)	780710,9840510,22004

However, what I have been looking for is the processing without involving files, as the input data might be quite big. So I basically would like to load Spark RDD or Hive table into SpatialRDD, convert the EPSG and store the result back into different Spark RDD or Hive table.

I am not sure how to achieve that as it seems the only way to create SpatialRDD is load the data from a file, e.g. PointRDDInputLocation. Do you have any suggestion on this?

Thanks a lot in advance for your help.

Kind regards,

Anto

from sedona.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.