mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-25 22:12:45 +03:00
Readme for GB postcodes had markdown syntax error
This commit is contained in:
parent
b612b99421
commit
b92a55f5fe
@ -27,39 +27,30 @@ If you forgot to download the file, or have a new version, you can import it sep
|
|||||||
|
|
||||||
Unpacked you'll see a directory of CSV files.
|
Unpacked you'll see a directory of CSV files.
|
||||||
|
|
||||||
```
|
$ more codepo_gb/Data/CSV/n.csv
|
||||||
$ more codepo_gb/Data/CSV/n.csv
|
"N1 0AA",10,530626,183961,"E92000001","E19000003","E18000007","","E09000019","E05000368"
|
||||||
"N1 0AA",10,530626,183961,"E92000001","E19000003","E18000007","","E09000019","E05000368"
|
"N1 0AB",10,530559,183978,"E92000001","E19000003","E18000007","","E09000019","E05000368"
|
||||||
"N1 0AB",10,530559,183978,"E92000001","E19000003","E18000007","","E09000019","E05000368"
|
|
||||||
```
|
|
||||||
|
|
||||||
The coordinates are "Northings" and "Eastings" in [OSGB 1936](http://epsg.io/1314) projection. They can be projected to WGS84 like this
|
The coordinates are "Northings" and "Eastings" in [OSGB 1936](http://epsg.io/1314) projection. They can be projected to WGS84 like this
|
||||||
|
|
||||||
```
|
SELECT ST_AsText(ST_Transform(ST_SetSRID('POINT(530626 183961)'::geometry,27700), 4326));
|
||||||
SELECT ST_AsText(ST_Transform(ST_SetSRID('POINT(530626 183961)'::geometry,27700), 4326));
|
POINT(-0.117872733220225 51.5394424719303)
|
||||||
POINT(-0.117872733220225 51.5394424719303)
|
|
||||||
```
|
|
||||||
[-0.117872733220225 51.5394424719303 on OSM map](https://www.openstreetmap.org/?mlon=-0.117872733220225&mlat=51.5394424719303&zoom=16)
|
[-0.117872733220225 51.5394424719303 on OSM map](https://www.openstreetmap.org/?mlon=-0.117872733220225&mlat=51.5394424719303&zoom=16)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
3. Create database, import CSV files, add geometry column, dump into file
|
3. Create database, import CSV files, add geometry column, dump into file
|
||||||
|
|
||||||
```
|
DBNAME=create_gb_postcode_file
|
||||||
DBNAME=create_gb_postcode_file
|
createdb $DBNAME
|
||||||
|
echo 'CREATE EXTENSION postgis' | psql $DBNAME
|
||||||
createdb $DBNAME
|
|
||||||
echo 'CREATE EXTENSION postgis' | psql $DBNAME
|
cat data/gb_postcode_table.sql | psql $DBNAME
|
||||||
|
cat codepo_gb/Data/CSV/*.csv | ./data-sources/gb-postcodes/convert_codepoint.php | psql $DBNAME
|
||||||
cat data/gb_postcode_table.sql | psql $DBNAME
|
cat codepo_gb/Doc/licence.txt | iconv -f iso-8859-1 -t utf-8 | dos2unix | sed 's/^/-- /g' > gb_postcode_data.sql
|
||||||
|
pg_dump -a -t gb_postcode $DBNAME | grep -v '^--' >> gb_postcode_data.sql
|
||||||
cat codepo_gb/Data/CSV/*.csv | ./data-sources/gb-postcodes/convert_codepoint.php | psql $DBNAME
|
|
||||||
|
gzip -9 -f gb_postcode_data.sql
|
||||||
cat codepo_gb/Doc/licence.txt | iconv -f iso-8859-1 -t utf-8 | dos2unix | sed 's/^/-- /g' > gb_postcode_data.sql
|
ls -lah gb_postcode_data.*
|
||||||
pg_dump -a -t gb_postcode $DBNAME | grep -v '^--' >> gb_postcode_data.sql
|
# dropdb $DBNAME
|
||||||
|
|
||||||
gzip -9 -f gb_postcode_data.sql
|
|
||||||
ls -lah gb_postcode_data.*
|
|
||||||
|
|
||||||
# dropdb $DBNAME
|
|
||||||
```
|
|
||||||
|
Loading…
Reference in New Issue
Block a user