Skip to content

Commit

Permalink
Revert "Merge branch 'gh-pages' of https://github.com/artemisquadatro…
Browse files Browse the repository at this point in the history
…/editor-layer-index into gh-pages"

This reverts commit 87146a5, reversing
changes made to 39a6437.
  • Loading branch information
artemisquadatro committed Nov 14, 2024
1 parent 87146a5 commit 5b46349
Show file tree
Hide file tree
Showing 344 changed files with 22,737 additions and 114,342 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
cp i18n/en.yaml deploy/i18n
- name: Deploy 🚀
uses: JamesIves/[email protected].3
uses: JamesIves/[email protected].0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_wms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
python scripts/check.py $(find sources -type f -name '*.geojson')
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6.1.0
uses: peter-evans/create-pull-request@v6.0.5
with:
commit-message: Sync WMS sources [skip travis]
delete-branch: true
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Supported TMS tokens:
- `{switch:a,b,c}` for DNS server multiplexing
- `{apikey}` for an app specific apikey

Example: `https://tile.openstreetmap.org/{zoom}/{x}/{y}.png`
Example: `https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png`

Supported WMS tokens:
- `{proj}` - requested projection (e.g. EPSG:3857)
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ The goal of this project is to maintain a canonical representation of the layers
* [iD](https://github.com/openstreetmap/iD)
* [Vespucci](http://vespucci.io/)
* [Go Map!!](https://wiki.openstreetmap.org/wiki/Go_Map!!)
* [MapComplete](https://mapcomplete.org)
* [Every Door](https://every-door.app/)
* [Potlatch 3](https://www.systemed.net/potlatch/) and
* [Potlatch 2](https://github.com/systemed/potlatch2) and
* [JOSM](https://josm.openstreetmap.de/) (optional)

Both imagery and other raster data that is useful for mapping are within scope of the project.
Expand Down
15 changes: 0 additions & 15 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ en:
text: Terms & Feedback
description: Esri archive imagery that may be clearer and more accurate than the default layer.
name: Esri World Imagery (Clarity) Beta
FOMI_2011_2014:
attribution:
text: Lechner Tudásközpont
description: Goverment-based leaf-covered orthophotos with 40 cm/pixel resolution for the entire country. This layer should be used as an alignment base in lack of a more accurate reference. WEBP format images, JOSM needs a webp plugin for them.
name: FÖMI orthophoto 2011-2014 (WEBP)
Frankfurt-am-Main-2019:
attribution:
text: Stadtvermessungsamt Frankfurt am Main
Expand Down Expand Up @@ -363,11 +358,6 @@ en:
text: © Naturvårdsverket, CC0
description: Daily updated trails in or around nature reserves as recorded by Swedish Environmental Protection Agency
name: Environmental Protection Agency - Trails
ODOT_TIMS_Road_Inventory:
attribution:
text: Ohio Department of Transportation
description: Ohio Department of Transportation (ODOT) - Transportation Information Mapping System (TIMS) Road Inventory published June 2024.
name: ODOT Road Inventory
OSIP:
attribution:
text: Ohio Statewide Imagery Program
Expand Down Expand Up @@ -574,11 +564,6 @@ en:
text: EUFAR Balaton ortofotó 2010
description: 1940 geo-tagged photography from Balaton Limnological Institute.
name: EUFAR Balaton orthophotos
geoscribble-latest:
attribution:
text: GeoScribble contributors
description: Geometric survey notes from Every Door editor, aged three weeks at most
name: GeoScribble latest notes
gothenburg-citymap:
attribution:
text: © Gothenburg municipality, CC0
Expand Down
2 changes: 1 addition & 1 deletion imagery.geojson

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion imagery.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion imagery.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements-dev.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pytest==8.3.3
pytest==8.2.0
pytest-cov==5.0.0
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pluggy==1.5.0
# via pytest
pyparsing==3.0.6
# via packaging
pytest==8.3.3
pytest==8.2.0
# via
# -r requirements-dev.in
# pytest-cov
Expand Down
22 changes: 11 additions & 11 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Libeli
pyproj==3.6.1
shapely==2.0.6
regex==2024.9.11
validators==0.34.0
shapely==2.0.4
regex==2024.4.28
validators==0.28.3

# Common
colorlog==6.9.0
jsonschema==4.23.0
colorlog==6.8.2
jsonschema==4.21.1
certifi>=2022.12.07

# Check
Expand All @@ -15,18 +15,18 @@ certifi>=2022.12.07

# Strict check
mercantile==1.2.1
requests==2.32.3
urllib3==2.2.3
validators==0.34.0
requests==2.32.2
urllib3==2.2.1
validators==0.28.3
#jsonschema
#shapely

# WMS sync
aiofiles==24.1.0
aiohttp[speedups]==3.10.8
aiofiles==23.2.1
aiohttp[speedups]==3.9.5
imagehash==4.3.1
python-magic==0.4.27
mercantile==1.2.1
pillow==11.0.0
pillow==10.3.0
#shapely
#pyproj
28 changes: 13 additions & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
#
# pip-compile requirements.in
#
aiodns==3.2.0
aiodns==3.0.0
# via aiohttp
aiofiles==24.1.0
aiofiles==23.2.1
# via -r requirements.in
aiohappyeyeballs==2.3.4
# via aiohttp
aiohttp[speedups]==3.10.8
aiohttp[speedups]==3.9.5
# via -r requirements.in
aiosignal==1.2.0
# via aiohttp
Expand All @@ -23,7 +21,7 @@ attrs==23.1.0
# referencing
brotli==1.0.9
# via aiohttp
certifi==2024.8.30
certifi==2024.2.2
# via
# -r requirements.in
# pyproj
Expand All @@ -34,7 +32,7 @@ charset-normalizer==2.0.9
# via requests
click==8.0.3
# via mercantile
colorlog==6.9.0
colorlog==6.8.2
# via -r requirements.in
frozenlist==1.2.0
# via
Expand All @@ -46,7 +44,7 @@ idna==3.7
# yarl
imagehash==4.3.1
# via -r requirements.in
jsonschema==4.23.0
jsonschema==4.21.1
# via -r requirements.in
jsonschema-specifications==2023.6.1
# via jsonschema
Expand All @@ -62,7 +60,7 @@ numpy==1.22.0
# pywavelets
# scipy
# shapely
pillow==11.0.0
pillow==10.3.0
# via
# -r requirements.in
# imagehash
Expand All @@ -80,23 +78,23 @@ referencing==0.29.1
# via
# jsonschema
# jsonschema-specifications
regex==2024.9.11
regex==2024.4.28
# via -r requirements.in
requests==2.32.3
requests==2.32.2
# via -r requirements.in
rpds-py==0.8.10
# via
# jsonschema
# referencing
scipy==1.10.0
# via imagehash
shapely==2.0.6
shapely==2.0.4
# via -r requirements.in
urllib3==2.2.3
urllib3==2.2.1
# via
# -r requirements.in
# requests
validators==0.34.0
validators==0.28.3
# via -r requirements.in
yarl==1.13.1
yarl==1.7.2
# via aiohttp
3 changes: 0 additions & 3 deletions scripts/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ def dict_raise_on_duplicates(ordered_pairs):
logger.debug("{} does not exist, skip".format(filename))
continue

if ":" in filename:
raise ValidationError(f"Filename contains invalid \":\" character: {filename}")

try:
## dict_raise_on_duplicates raises error on duplicate keys in geojson
source = json.load(io.open(filename, encoding="utf-8"), object_pairs_hook=dict_raise_on_duplicates)
Expand Down
26 changes: 7 additions & 19 deletions scripts/convert_xml.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import io
import xml.etree.cElementTree as ET
from shapely.geometry import shape, Polygon, MultiPolygon
from shapely import get_num_geometries, get_num_coordinates

root = ET.Element("imagery", {"xmlns" :"http://josm.openstreetmap.de/maps-1.0"})
root = ET.Element("imagery")

sources = []
for file in sys.argv[1:]:
Expand All @@ -20,20 +19,14 @@ def add_source(source):
name = ET.SubElement(entry, "name")
name.text = props["name"]

id = ET.SubElement(entry, "id")
id.text = props["id"]
name = ET.SubElement(entry, "id")
name.text = props["id"]

type = ET.SubElement(entry, "type")
type.text = props["type"]

url = ET.SubElement(entry, "url")
url.text = props["url"]

category = ET.SubElement(entry, "category")
if "category" in props:
category.text = props["category"]
else:
category.text = "photo"

if props.get("overlay"):
entry.set("overlay", "true")
Expand Down Expand Up @@ -77,7 +70,7 @@ def add_source(source):
icon = ET.SubElement(entry, "icon")
icon.text = props["icon"]

if "country_code" in props and props["country_code"].upper() not in ["XN", "ZZ"]:
if "country_code" in props:
country_code = ET.SubElement(entry, "country-code")
country_code.text = props["country_code"]

Expand All @@ -88,15 +81,14 @@ def add_source(source):
if "description" in props:
description = ET.SubElement(entry, "description")
description.text = props["description"]
description.set("lang", "en")

if "min_zoom" in props:
min_zoom = ET.SubElement(entry, "min-zoom")
min_zoom.text = str(props["min_zoom"])

if "max_zoom" in props:
max_zoom = ET.SubElement(entry, "max-zoom")
max_zoom.text = str(min(24, props["max_zoom"]))
max_zoom.text = str(props["max_zoom"])

geometry = source.get("geometry")
if geometry:
Expand All @@ -113,18 +105,14 @@ def coord_str(coord):
bounds.set("max-lon", coord_str(maxx))
bounds.set("max-lat", coord_str(maxy))

if isinstance(geom, Polygon) and get_num_coordinates(geom) <= 999:
if isinstance(geom, Polygon):
shape_element = ET.SubElement(bounds, "shape")
for lon, lat in geom.exterior.coords:
point = ET.SubElement(shape_element, "point")
point.set("lon", coord_str(lon))
point.set("lat", coord_str(lat))

if isinstance(geom, MultiPolygon) and get_num_geometries(geom) <= 100:
# check size of polygons first
for poly in geom.geoms:
if get_num_coordinates(poly) > 999:
return
if isinstance(geom, MultiPolygon):
for poly in geom.geoms:
shape_element = ET.SubElement(bounds, "shape")
for lon, lat in poly.exterior.coords:
Expand Down
4 changes: 2 additions & 2 deletions site/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var map = L.map('map', {
maxZoom: 25
}).fitWorld();

L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>'
}).addTo(map);

Expand Down Expand Up @@ -44,7 +44,7 @@ function idURL(d, e) {
editor: 'id',
background: 'custom:' + d.properties.url
};
return 'https://www.openstreetmap.org/edit?' + position + (new URLSearchParams(params)).toString();
return 'https://www.openstreetmap.org/edit?' + (new URLSearchParams(params)).toString() + position;
}


Expand Down
Loading

0 comments on commit 5b46349

Please sign in to comment.