I have twitter data with coordinates such as: [-7.2377761, 112.73091137]

I'm working with a python geo library called osgeo. The sample code indicates creating a point like this.

point = osgeo.ogr.Geometry(osgeo.ogr.wkbPoint)
point.SetPoint(0, 474595, 4429281)

The values above do not look like lat/lon. How do I perform the conversion?


There is nothing in your Question to suggest that you need to perform a conversion.

Instead, I would try:

point = osgeo.ogr.Geometry(osgeo.ogr.wkbPoint)
point.SetPoint(0, 112.73091137, -7.2377761)

The original values look like they are from a projected coordinate system whereas you appear to be receiving Twitter data in a geographic coordinate system but both are just numbers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.