7

I m quite new with the GIS science and would like a bit of help. I m a weather forecaster and doing my MSc degree.

I have a list generated with WRF and contains in a txt format the long and lats and solar radiation values. I would like to export this data into a list which will contain the postcodes assigned to the long and lats for England. Could anyone help me on this?

Thanks.

  • 2
    Does WRF mean Weather Research and Forecasting? – djq Oct 29 '12 at 22:14
  • A couple of questions. Firstly, what is the approximate resolution of your radiation value data? Secondly, how large are your postcode areas going to be? For example, my street-level postcode is RG4 8NX but I guess you won't be working at street level, but at top level (RG, for example) or at second level (RG1, RG2, et cetera). – nhopton Oct 30 '12 at 9:52
  • 1
    Just a general comment, but post codes were never designed for 99% of the uses they are put to including this one. I'm not saying your application is necessarily bad. I'm just urging caution, not least because post codes vary dramatically in area between urban and rural locations (and therefore latitude range). In fact there is no designated relationship between area and a postcode and they also can change size and number over the years depending on the whimsy of the Royal Mail (= the modifiable areal unit problem), which can all make any statistics calculated by postcode a bit dodgy! – MappaGnosis Oct 30 '12 at 10:39
6

First, in QGIS you should create points out of the lat/long text data. A good format to store this data in is a .csv file. Then, in QGIS go to Layer -> Add Delimited Text Layer.

Next, you need to locate the postcode polygons for England. Here is one source (but it does not seem to be free). Once you locate this file, you can add it in as a layer (you need to make sure that both files are in the same projection).

To relate the two layers, you can use a process called a Spatial Join. In QGIS this is located under Vector -> Data Management Tools -> Join Attributes by location. This enables you to match the postcode IDs to the points.

1

You can load this 'crowd sourced' list http://www.freethepostcode.org/currentlist

into postgis and match (do a near) using ST_Distance

http://postgis.refractions.net/docs/ST_Distance.html

on the loaded data.

alternatively

MySociety also mirror the OS Opendata website and is updated when datasets change

http://parlvid.mysociety.org:81/os/ Code-Point Open (May 2012) is already projected in top WGS84 (Lat/Lng)

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.