Skip to content

Commit

Permalink
fix: use https instead of http in helsinki importer
Browse files Browse the repository at this point in the history
Using http seems to cause the following error:
"GDAL_ERROR 1: b'GnuTLS recv error (-110): The TLS connection was non-properly terminated.. You may set the CPL_CURL_IGNORE_ERROR configuration option to YES to try to ignore it.'"

This *should* fix the issue.

Refs: RATYK-17
  • Loading branch information
danipran committed Dec 4, 2023
1 parent f7bf54a commit d9069d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [unreleased]
### Fixed
- Fix Helsinki importer urls

## [0.3.9] - 2023-08-22
### Fixed
- Fix municipality url
Expand Down
6 changes: 3 additions & 3 deletions munigeo/importer/helsinki.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from django.conf import settings

MUNI_URL = "http://tilastokeskus.fi/meta/luokitukset/kunta/001-2013/tekstitiedosto.txt"
MUNI_URL = "https://tilastokeskus.fi/meta/luokitukset/kunta/001-2013/tekstitiedosto.txt"

# The Finnish national grid coordinates in TM35-FIN according to JHS-180
# specification. We use it as a bounding box.
Expand Down Expand Up @@ -319,7 +319,7 @@ def import_plans(self):
def import_addresses(self):
none_to_str = lambda s: s or ""

wfs_url = 'http://kartta.hel.fi/ws/geoserver/avoindata/wfs?' \
wfs_url = 'https://kartta.hel.fi/ws/geoserver/avoindata/wfs?' \
'SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&' \
'TYPENAME=avoindata:PKS_osoiteluettelo&' \
'SRSNAME=EPSG:3067&outputFormat=application/json'
Expand Down Expand Up @@ -463,7 +463,7 @@ def make_addr_id(num, num_end, letter):
self.logger.info("synchronization complete")

def import_pois(self):
URL_BASE = 'http://www.hel.fi/palvelukarttaws/rest/v2/unit/?service=%d'
URL_BASE = 'https://www.hel.fi/palvelukarttaws/rest/v2/unit/?service=%d'

muni_dict = {}
for muni in Municipality.objects.all():
Expand Down

0 comments on commit d9069d9

Please sign in to comment.