I have an EXCEL spreadsheet with a list of cities, province and Latitude and Longitude. Example: enter image description here

I also have a SHAPEFILES of Canadian Federal Election Ridings

I wish to update the EXCEL such that it would identify the Federal riding of the city based upon the Latitude-longitude coordinates Example of update below.

enter image description here

I suspect that QGIS would have the algorithm to identify federal ridings

The EXCEL has over 30,000 locations.... so automation is a must.

I'm getting BLANK returns. See below I'm getting: Major city latitude longitude FED_NUM NID FEDNUM ENNAME.. .etc but no mapping of a city to a Federal riding.

When I import the CITY EXCEL file and the Federal riding SHAPEFILE.. i can see the City dots over the various SHAPEFILEs... but it does not connect the City to the riding.

enter image description here


You can add your excel file via the delimited text button (save it out of excel as csv). Drag your Ridings shapefiles into QGIS. You then want to do a Spatial Join on the two layers and then save your new layer (by right clicking and picking save as), choose CSV as your output format and you can pull the file back into excel.

  • Hi Thanx for the lead. However, I'm getting BLANK returns. See below:Major city latitude longitude OBJECTID PR_HRUID ENG_LABEL FRE_LABEL PEER Edmonton 53.54624 -113.49037 Vancouver 49.26038 -123.11336 Winnipeg 49.89953 -97.14113 Fredericton 45.96063 -66.63911
    – Michel
    Dec 21 '18 at 20:52

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.