Skip to content

sp2WB in Maptools - order of polygons

2 messages · kath_o_reilly, Virgilio Gomez Rubio

#
Dear R users,

I plan on using the command sp2WB to convert a .shp file to a .map file in
order to carry out some analysis in WinBUGS. Thanks for the threads I've
followed on how to do this.

The command itself is working fine and produces the map I would expect.
However to analyse the data for each polygon, I need to know which polygon
is which. How do I determine the ID for each polygon generated? I'm hoping
there is a better solution than figuring it out by hand...

Regards,

Kath O'Reilly
#
Dear Kath,
You will need to find a match between your polygons and your data.
Usually, this is done by means of an area ID (postcode, district code,
etc.). Then you can reorder either your polygons or your data to have
both in the same order, and then produce the files (maps and data) for
WinBUGS.

Best wishes,