msramalho / CP7

Portuguese zip codes with coordinates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CP7

Portuguese zip codes with coordinates
Códigos Postais de Portugal, georreferenciados

  • List of 154.946 CP7 of Portugal cleaned, with Latitude and Longitude. txt file separated with tab || shp || geojson > These are more up to date.
  • List of 316.129 CP7, with all the addresses, but repeated CP7 Rds file > This is from the CTT list
  • List of 9250 CP7 of Lisbon region, with Latitude and Longitude. txt file separated with tab || shapefile
  • CP4 polygons of their cover areas, estimated by their districts, sections and statistic sub-sections, for the Continent and Archipelagos. shapefile || R script to produce them

About

The portuguese CP (zip code) is made by a combination of 4 + 3 digits.
The first 4 digits have a correspondence of an area, normaly equivalent to the old districts (Freguesias pré 2014), or districts together. For example, Arroios can be 1000, 1150 or 1170. The Parque das Nações and Moscavide can be 1990 or 1998 😊

Aproximation of CP4, for Lisbon

All those who start with 1000 are from Lisbon and its surroundings. Those CP4 ending in 1, 6 or 9, are normally for commercial, institutional, or compannies addresses, and they do not hold an own area of influence.
The last 3 digits (CP7) indicate a street or street segment (edge of a block), a point in the middle of that street segment.
The coordinates of this point that can be extracted, giving a very approximate location of the actual address.

An aproximated influence area of Lisbon's CP7, using Voronoi for the CP7 point coordinates, is this: Voronoi with centroids

The estimated CP4 areas for Portugal, matched with administrative areas, looks like this: Matched areas
(Although some holes are pretty obvious, it would require some non-automatized process to fill them without redundance)

Sources

This compilation was made by Rosa Félix. The sources used were:

  • The commercial database for Lisbon 2009 Geodados, with the atitmetic average of lat and long for each CP7
  • A personal collection of institutional CP7 - the ones that end with xx49, such as universities and companies
  • List of all CP7, fom the CTT website CTT - registeration required
  • SQL file from github.com/cusco/ctt with lat/long computed 👍

About

Portuguese zip codes with coordinates

License:GNU General Public License v3.0


Languages

Language:R 100.0%