Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to calculate the lat/long of points using the Q GIS field calculator.Nathan W suggested to First, save the layer as WGS84 and import it again. Then in the field calculator you can use $x or $y as a variable to get the x and y. but the problem is this: i dont know how to write a expression in field calculator for finding $X and $Y?

share|improve this question
up vote 4 down vote accepted

You have your answer already. In field calculator expression, just type '$x' (without the quotes) to populate a Longitude field, and the '$y' for Latitude Field. You calculate them one at a time.

If you don't have a latitude and longitude fields yet, you can select the "Create a new field" box on the top of the dialog and create them.

If you have more doubts about how to use the calculator itself, then the QGIS user manual is very helpful, take a look into the field calculator chapter.

Hope it helps!

share|improve this answer
ya !i got it!thanks..... – Arun Jul 3 '13 at 10:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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