[GIS] Creating/generating LDU polygon boundaries of Canada

boundariescanadapostal-code

Back Ground on issue:
http://www.opennorth.ca/2013/03/05/open-postal-code-data-now.html

Related Question:
Where can I find Canadian postal code geometries?

Canada Postal Unit: LOR 1B7
Canada has released Forward Sortation Area Boundary(FSA) Boundaries for a Postal Code for example LOR 1B7, the FSA code is the first 3 letters: LOR:

LOR

Currently only a few commercial companies have MultiPloygons that can be used to represent
the Local Delivery Unit(LDU) for example LOR 1B7,the LDU code is the last 3 letters 1B7:

LDU

these commercial companies would provide a shapefile that contains all "LDU"s of Canada selling it for the tens of thousands.

example Shapefile from Platinum Postal Suite:

enter image description here

How can one implement LDU multipolygons?

How do commercial companies obtain this information to do such a rendering?

update
We were able to implement LDU Boudnaries for CA example: LOR 1B7,.enter image description here our API boundaries-io
www.boundaries-io.com

Best Answer

REGARDING IMPLEMENTATION OF POLYGON STORAGE

To implement the concept of georeferenced polygons one must to establish the geopoints that serve as vortices (line endpoints) around the polygon (on the perimeter / path / track) and save them in order, repeating the first geopoint at the end to close the polygon.

One critical decision in mapmaking is determining what parsing format will be used to store geodata (kml, txt, gpx, for example). Some apps render many of these formats, others only a few, some export to various formats, other only to one or two of them.

I very much like GPS Trackmaker as a free conversion / mapping / downloading tool. Their premium solution is great, too.

In this case, i chose TXT files because they are very readable, though they offer infinitely less features and control than, say, kml.

If you examine a polygon parsed for TXT map rendering, you will find something like:

Datum,WGS84,WGS84,0,0,0,0,0
TP,D,-22.825397,-50.153163,00/00/00,00:00:00,0,1
TP,D,-22.825200,-50.152714,00/00/00,00:00:00,0,0
TP,D,-22.823723,-50.153354,00/00/00,00:00:00,0,0
TP,D,-22.822100,-50.154057,00/00/00,00:00:00,0,0
TP,D,-22.821690,-50.161636,00/00/00,00:00:00,0,0
TP,D,-22.826374,-50.161976,00/00/00,00:00:00,0,0
TP,D,-22.828237,-50.162113,00/00/00,00:00:00,0,0
TP,D,-22.828402,-50.161358,00/00/00,00:00:00,0,0
TP,D,-22.828742,-50.160024,00/00/00,00:00:00,0,0
TP,D,-22.829096,-50.158811,00/00/00,00:00:00,0,0
TP,D,-22.829479,-50.158032,00/00/00,00:00:00,0,0
TP,D,-22.829795,-50.157471,00/00/00,00:00:00,0,0
TP,D,-22.829857,-50.157399,00/00/00,00:00:00,0,0
TP,D,-22.827251,-50.157266,00/00/00,00:00:00,0,0
TP,D,-22.826972,-50.157094,00/00/00,00:00:00,0,0
TP,D,-22.826561,-50.156311,00/00/00,00:00:00,0,0
TP,D,-22.825397,-50.153163,00/00/00,00:00:00,0,0

notice that your first geopoint ends with 1 but all others end with 0. every new polygon starts with a 1. if your txt file comprises multiple polygons, it might read

... 
TP,D,-22.826972,-50.157094,00/00/00,00:00:00,0,0
TP,D,-22.826561,-50.156311,00/00/00,00:00:00,0,0
TP,D,-22.825397,-50.153163,00/00/00,00:00:00,0,0
TP,D,-22.8262790668339,-50.1473961808541,00/00/00,00:00:00,1
TP,D,-22.8253937791693,-50.1469750073087,00/00/00,00:00:00,0
TP,D,-22.8251435375745,-50.1460977703752,00/00/00,00:00:00,0
TP,D,-22.8249603671508,-50.1452553933599,00/00/00,00:00:00,0
TP,D,-22.8284303087316,-50.1438831245289,00/00/00,00:00:00,0
...

REGARDING HOW YOU OBTAIN THE DATA

I recommend that you request the info from the Canada Post directly. You will probably receive a list of street / road addresses, which will then have to be converted to geopoints. You might be able to get away with getting the data from a Google API, but it is certainly irregular and you don't want to have a commercially useless list of geopoints, do you?

So you probably use opensource / community developed Nominatim 's API and batch convert. Please read their terms of service, too!

Related Question