diff --git a/OSMtoPixel.ipynb b/OSMtoPixel.ipynb index 51fce35671b6a61ab79ae0c697605fae5e654820..af18e9e819cf11105da603daf0dc95adb57e9373 100644 --- a/OSMtoPixel.ipynb +++ b/OSMtoPixel.ipynb @@ -7,11 +7,12 @@ "metadata": {}, "outputs": [], "source": [ - "import osmnx\n", - "import matplotlib.pyplot as plt\n", - "import numpy as np\n", - "import pyproj, math, json, geopandas\n", - "from shapely.geometry import Point, MultiPolygon, Polygon, LineString\n", + "import numpy as np, pandas as pd\n", + "import matplotlib.pyplot as plt, matplotlib.path as path\n", + "import osmnx, pyproj, math, json, geopandas, re\n", + "from collections import defaultdict, Counter\n", + "from rasterio.features import rasterize\n", + "from shapely.geometry import Point, MultiPolygon, Polygon, LineString, MultiLineString\n", "%matplotlib inline\n", "plt.rcParams['figure.figsize'] = [12, 8]\n", "plt.rcParams['patch.antialiased'] = False\n", @@ -21,593 +22,604 @@ { "cell_type": "code", "execution_count": null, - "id": "original-tiger", + "id": "focused-discharge", "metadata": {}, "outputs": [], "source": [ - "#bbw,bbn,bbe,bbs=7.40518,51.49034,7.40807,51.48935 # OH12 OH14\n", - "bbw,bbn,bbe,bbs=7.40144,51.49557,7.42453,51.48731 # Campus Nord\n", - "#bbw,bbn,bbe,bbs=7.40144,51.49557,7.42453,51.481132 # TU gesamt\n", + "bbw,bbn,bbe,bbs=7.4045,51.4899,7.408,51.4899 # OH12 OH14. Bei -10.75 gerade, Höhe durch Drehung bestimmt.\n", + "bbw,bbn,bbe,bbs=7.4035,51.4945,7.4225,51.4897 # Campus Nord\n", + "#bbw,bbn,bbe,bbs=7.40144,51.49557,7.42453,51.481132 # TU gesamt alt\n", + "#bbw,bbn,bbe,bbs=7.404,51.495,7.424,51.483 # TU gesamt\n", "#bbw,bbn,bbe,bbs=7.30813,51.45197,7.40048,51.42008 # Witten for stress test\n", - "\n", - "padew, padns = 0.0005, 0.0002\n", - "tags = {\"building\":True,\"natural\":True,\"landuse\":True,\"parking\":True,\"surface\":True,\"waterway\":True,\n", - " \"highway\":True,\"railway\":True,\"entrance\":True,\"leisure\":True,\"amenity\":True,\"tourism\":True,\"barrier\":True}\n", - "rawgdf = osmnx.geometries.geometries_from_bbox(bbn+padns,bbs-padns,bbe+padew,bbw-padew,tags)" + "ang = -10.75/180*math.pi # Rotation" ] }, { "cell_type": "code", "execution_count": null, - "id": "legitimate-easter", + "id": "alert-printing", "metadata": {}, "outputs": [], "source": [ - "# Prepare manual coordinate transformation:\n", - "center = pyproj.Transformer.from_crs(\"WGS-84\", \"epsg:32632\").transform(0.5*(bbs+bbn), 0.5*(bbw+bbe))\n", - "ang = -10.75/180*math.pi # ONLY SMALL ANGLES WILL WORK BELOW\n", - "# via: projinfo -o PROF -s WGS84 -t EPSG:32632\n", - "pstr=\"+proj=pipeline\"\n", - "pstr+=\" +step +proj=axisswap +order=2,1\"\n", - "pstr+=\" +step +proj=unitconvert +xy_in=deg +xy_out=rad\"\n", - "pstr+=\" +step +proj=utm +zone=32 +ellps=WGS84\"\n", - "# Additional rotation around center:\n", - "pstr+=\" +step +proj=affine +xoff=%f +yoff=%f\" % (-center[0], -center[1])\n", - "co,si=math.cos(ang), math.sin(ang)\n", - "pstr+=\" +step +proj=affine +s11=%f +s12=%f +s21=%f +s22=%f\" % (co,-si,si,co)\n", - "#pstr+=\" +step +proj=affine +s11=1 +s21=0.5\"\n", - "pstr+=\" +step +proj=affine +xoff=%f +yoff=%f\" % (center[0], center[1])\n", - "transformer = pyproj.transformer.Transformer.from_pipeline(pstr)\n", - "\n", - "# Project data frame to UTM, too.\n", - "gdf = rawgdf.to_crs(epsg=\"32632\")\n", - "# This MUST match the transformation above.\n", - "gdf[\"geometry\"] = gdf[\"geometry\"].translate(-center[0], -center[1]) \\\n", - " .rotate(ang, origin=(0,0), use_radians=True) \\\n", - " .translate(center[0], center[1])\n", - "# .scale(1,0.5, origin=(0,0)) \\\n", - "#gdf" + "import shapely.affinity, shapely.ops\n", + "bbox=shapely.affinity.rotate(Polygon([(bbw,bbn),(bbe,bbn),(bbe,bbs),(bbw,bbs)]), -ang, 'center', use_radians=True)\n", + "qbw,qbs,qbe,qbn = bbox.bounds\n", + "print(\"Bounding box\", bbw,bbn,bbe,bbs,\"->\",qbw,qbn,qbe,qbs)" ] }, { "cell_type": "code", "execution_count": null, - "id": "decreased-baker", + "id": "original-tiger", "metadata": {}, "outputs": [], "source": [ - "# Projected (rotated) bounding box:\n", - "#transformer = pyproj.transformer.Transformer.from_crs(crs_from=\"WGS-84\", crs_to=\"epsg:32632\")\n", - "psw, pnw = transformer.transform(bbs-padns,bbw-padew), transformer.transform(bbn+padns,bbw-padew)\n", - "pse, pne = transformer.transform(bbs-padns,bbe+padew), transformer.transform(bbn+padns,bbe+padew)\n", - "# ONLY SMALL ROTATION ANGLES WILL WORK HERE - FIX THIS FOR LARGER ROTATION:\n", - "pbw = math.ceil(max(psw[0], pnw[0]))\n", - "pbe = math.floor(min(pse[0], pne[0]))\n", - "pbs = math.ceil(max(psw[1], pse[1]))\n", - "pbn = math.floor(min(pne[1], pnw[1]))\n", - "pbw,pbw,pbs,pbn #,psw,pnw,pse,pne" + "padew, padns = 0.002, 0.0005\n", + "tags = {\"building\":True,\"natural\":True,\"landuse\":True,\"parking\":True,\"surface\":True,\"waterway\":True,\n", + " \"highway\":True,\"railway\":True,\"entrance\":True,\"leisure\":True,\"amenity\":True,\"tourism\":True,\"barrier\":True}\n", + "rawgdf = osmnx.geometries.geometries_from_bbox(max(bbn,qbn)+padns,min(bbs,qbs)-padns,max(bbe,qbe)+padew,min(bbw,qbw)-padew,tags)" ] }, { "cell_type": "code", "execution_count": null, - "id": "surgical-cuisine", + "id": "authentic-cincinnati", "metadata": {}, "outputs": [], "source": [ - "grass = gdf[gdf[\"landuse\"]=='grass'].dropna(axis=1,how='all')\n", - "forest = gdf[gdf[\"landuse\"]=='forest'].dropna(axis=1,how='all')\n", - "railway = gdf[gdf[\"landuse\"]=='railway'].dropna(axis=1,how='all')\n", - "commercial = gdf[gdf[\"landuse\"]=='commercial']\n", - "commercial=commercial.dropna(axis=1,how='all')\n", - "#grass" + "# Determine rotation center in UTM zone:\n", + "pbbox = geopandas.GeoDataFrame({\"geometry\":[bbox]}, crs=\"WGS-84\").to_crs(epsg=\"25832\")[\"geometry\"][0]\n", + "center = pbbox.centroid.coords[0] # Projected center\n", + "pbw,pbs,pbe,pbn = map(round,pbbox.bounds) # Projected bounding box" ] }, { "cell_type": "code", "execution_count": null, - "id": "essential-sunday", + "id": "legitimate-easter", "metadata": {}, "outputs": [], "source": [ - "streets = gdf[(gdf[\"highway\"] == \"secondary\") | (gdf[\"highway\"] == \"tertiary\") | (gdf[\"highway\"] == \"residential\")].dropna(axis=1,how='all')\n", - "roads = gdf[gdf[\"highway\"] == \"service\"].dropna(axis=1,how='all')\n", - "pedestrian = gdf[gdf[\"highway\"] == \"pedestrian\"].dropna(axis=1,how='all')\n", - "if \"railway\" in gdf.columns:\n", - " rail = gdf[(~gdf[\"railway\"].isna()) & (gdf[\"railway\"] != \"razed\") & (gdf[\"railway\"] != \"abandoned\") & (gdf[\"layer\"].isna()) & (gdf[\"tunnel\"].isna()) & (gdf[\"element_type\"]==\"way\")] # ground rail only\n", - " rail = rail.dropna(axis=1,how='all')\n", - " brail = gdf[(~gdf[\"railway\"].isna()) & (gdf[\"railway\"] != \"razed\") & (gdf[\"railway\"] != \"abandoned\") & (~gdf[\"layer\"].isna())] # bridge rail only\n", - " brail = brail.dropna(axis=1,how='all')\n", - "else: rail = brail = geopandas.GeoDataFrame() # empty\n", - "parking = gdf[(~gdf[\"parking\"].isna()) & (gdf[\"element_type\"] == \"way\")]\n", - "parking = parking.dropna(axis=1,how='all')\n", - "path = gdf[(gdf[\"highway\"] == \"footway\") | (gdf[\"highway\"] == \"cycleway\") | (gdf[\"highway\"] == \"path\") | (gdf[\"highway\"] == \"steps\") | (gdf[\"surface\"] == \"paved\")]\n", - "path = path.dropna(axis=1,how='all')" + "xscale, yscale, zscale=1, 1/2, 1\n", + "#xscale, yscale, zscale=.75, .75/2, 1\n", + "# Project data frame to UTM zone, then rotate\n", + "# and then project into output coordinates\n", + "gdf = rawgdf.to_crs(epsg=\"25832\")\n", + "gdf[\"geometry\"] = gdf[\"geometry\"].rotate(ang, origin=center, use_radians=True) \\\n", + " .translate(-pbw,-pbs-(pbn-pbs)).scale(xscale, -yscale, origin=(0,0))\n", + "pwid,phei=int((pbe-pbw)*xscale),int((pbn-pbs)*yscale)\n", + "print(\"Output map size:\", pwid,phei)" ] }, { "cell_type": "code", "execution_count": null, - "id": "backed-cheese", + "id": "narrative-province", "metadata": {}, "outputs": [], "source": [ - "buildings=gdf[~gdf[\"building\"].isna()].dropna(axis=1,how='all')\n", - "entrances=gdf[~gdf[\"entrance\"].isna()].dropna(axis=1,how='all')\n", - "#buildings" + "# Sort by layer ascending, area descending as drawing order\n", + "def lev(s): return [int(re.split(r\"[;-]\", x)[-1]) if pd.notnull(x) else 0 for x in s]\n", + "gdf.sort_values(\"geometry\", ascending=False, inplace=True, key=lambda s: [x.area for x in s])\n", + "gdf.sort_values(\"layer\", ascending=True, inplace=True, kind=\"mergesort\", na_position=\"first\")\n", + "gdf.sort_values(\"level\", ascending=True, inplace=True, kind=\"mergesort\", na_position=\"first\", key=lev)" ] }, { "cell_type": "code", "execution_count": null, - "id": "occasional-brisbane", + "id": "continental-ebony", "metadata": {}, "outputs": [], "source": [ - "tables=gdf[(gdf[\"leisure\"]==\"picnic_table\") & (gdf[\"element_type\"] == \"node\")].dropna(axis=1,how='all')\n", - "benches=gdf[(gdf[\"amenity\"]==\"bench\") & (gdf[\"element_type\"] == \"node\")].dropna(axis=1,how='all')\n", - "pool=gdf[gdf[\"leisure\"]==\"swimming_pool\"].dropna(axis=1,how='all')" + "tmap = {\n", + " # \"commercial\": -1,\n", + " \"bg\": 0,\n", + " \"scrub\": 1,\n", + " \"grassland\": 2,\n", + " \"grass\": 3,\n", + " \"meadow\": 4,\n", + " \"forest\": 5,\n", + " \"water\": 6,\n", + " \"waterway\": 7,\n", + " \"sand\": 8,\n", + " \"garden\": 9,\n", + " \"path\": 10,\n", + " \"footway\": 11,\n", + " \"pedestrian\": 12,\n", + " \"cycleway\": 13,\n", + " \"steps\": 14,\n", + " \"parking\": 20,\n", + " \"service\": 21,\n", + " \"residential\": 22,\n", + " \"tertiary\": 23,\n", + " \"secondary\": 24,\n", + " \"primary\": 25,\n", + " \"motorway\": 26,\n", + " \"railways\": 30,\n", + " \"railway\": 31,\n", + " \"building\": 40,\n", + " \"indoor\": 41,\n", + " \"roof\": 42,\n", + "}" ] }, { "cell_type": "code", "execution_count": null, - "id": "wrapped-frontier", + "id": "durable-spread", "metadata": {}, "outputs": [], "source": [ - "grass2 = gdf[gdf[\"natural\"] == 'grassland'].dropna(axis=1,how='all')\n", - "water = gdf[gdf[\"natural\"] == 'water'].dropna(axis=1,how='all')\n", - "waterway = gdf[~gdf[\"waterway\"].isna()].dropna(axis=1,how='all') if \"waterway\" in gdf.columns else geopandas.GeoDataFrame()\n", - "wood = gdf[gdf[\"natural\"] == 'wood'].dropna(axis=1,how='all')\n", - "scrub = gdf[gdf[\"natural\"] == 'scrub'].dropna(axis=1,how='all')\n", - "trees = gdf[gdf[\"natural\"] == 'tree'].dropna(axis=1,how='all')\n", - "artwork = gdf[gdf[\"tourism\"] == 'artwork'].dropna(axis=1,how='all')\n", - "signs = gdf[gdf[\"tourism\"] == 'information'].dropna(axis=1,how='all')\n", - "lamps = gdf[gdf[\"highway\"] == 'street_lamp'].dropna(axis=1,how='all')\n", - "busstops = gdf[gdf[\"highway\"] == 'bus_stop'].dropna(axis=1,how='all')\n", - "wastes = gdf[gdf[\"amenity\"] == 'waste_basket'].dropna(axis=1,how='all')\n", - "bicycles = gdf[gdf[\"amenity\"] == 'bicycle_parking'].dropna(axis=1,how='all')\n", - "bollards = gdf[gdf[\"barrier\"] == 'bollard'].dropna(axis=1,how='all')" + "def shifted(g,tex,w):\n", + " yield (g,tex)\n", + " yield (shapely.affinity.translate(g,w,0),tex)\n", + " yield (shapely.affinity.translate(g,-w,0),tex)\n", + " yield (shapely.affinity.translate(g,0,w),tex)\n", + " yield (shapely.affinity.translate(g,0,-w),tex)\n", + " x = w * 0.71\n", + " yield (shapely.affinity.translate(g,x,x),tex)\n", + " yield (shapely.affinity.translate(g,x,-x),tex)\n", + " yield (shapely.affinity.translate(g,-x,x),tex)\n", + " yield (shapely.affinity.translate(g,-x,-x),tex)\n", + " if w > 1:\n", + " yield (shapely.affinity.translate(g,0.5*w,0),tex)\n", + " yield (shapely.affinity.translate(g,-0.5*w,0),tex)\n", + " yield (shapely.affinity.translate(g,0,0.5*w),tex)\n", + " yield (shapely.affinity.translate(g,0,-0.5*w),tex)\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "oriental-oklahoma", + "id": "chicken-avatar", "metadata": {}, "outputs": [], "source": [ - "def fig_to_numpy(fig, dpi):\n", - " import io\n", - " # Via PNG was the only way that worked without white padding :-()\n", - " with io.BytesIO() as io_buf:\n", - " fig.savefig(io_buf, format='png', dpi=dpi, bbox_inches=\"tight\", pad_inches=0)\n", - " io_buf.seek(0)\n", - " return plt.imread(io_buf)" + "floor = defaultdict(list)\n", + "for index, row in gdf.iterrows():\n", + " g, k, layer, level = row[\"geometry\"], row[\"element_type\"], row[\"layer\"], row[\"level\"]\n", + " layer = 10*int(layer) if pd.notnull(layer) else 0\n", + " level = int(re.split(r\"[;-]\", level)[-1]) if pd.notnull(level) else 0\n", + " # if level < 0: continue # S-Bahn-Bahnhof!\n", + " if k == \"node\": continue # Nodes are processed later.\n", + " # if row.get(\"landuse\") == \"commercial\": floor[layer].append((g,tmap[\"commercial\"]))\n", + " if row.get(\"leisure\") == \"garden\": floor[layer].append((g,tmap[\"garden\"]))\n", + " if row.get(\"landuse\") == \"grass\": floor[layer].append((g,tmap[\"grass\"]))\n", + " if row.get(\"landuse\") == \"meadow\": floor[layer].append((g,tmap[\"meadow\"]))\n", + " if row.get(\"landuse\") == \"farmland\": floor[layer].append((g,tmap[\"meadow\"]))\n", + " if row.get(\"leisure\") == \"park\": floor[layer].append((g,tmap[\"grassland\"]))\n", + " if row.get(\"leisure\") == \"pitch\": floor[layer].append((g,tmap[\"grass\"]))\n", + " if row.get(\"natural\") == \"grassland\": floor[layer].append((g,tmap[\"grassland\"]))\n", + " if row.get(\"natural\") == \"scrub\": floor[layer].append((g,tmap[\"scrub\"]))\n", + " if row.get(\"landuse\") == \"forest\": floor[layer].append((g,tmap[\"forest\"]))\n", + " if row.get(\"natural\") == \"wood\": floor[layer].append((g,tmap[\"forest\"]))\n", + " if row.get(\"natural\") == \"water\": floor[layer+1].append((g,tmap[\"water\"]))\n", + " #if pd.notnull(row.get(\"waterway\")): floor[layer].append((g,tmap[\"waterway\"])) # TODO: special renderer\n", + " if pd.notnull(row.get(\"waterway\")): floor[layer].extend(shifted(g,tmap[\"waterway\"],.3))\n", + " if row.get(\"leisure\") == \"swimming_pool\": floor[layer].append((g,tmap[\"water\"]))\n", + " if row.get(\"natural\") == \"beach\": floor[layer].append((g,tmap[\"sand\"]))\n", + " if row.get(\"natural\") == \"sand\": floor[layer].append((g,tmap[\"sand\"]))\n", + " if row.get(\"landuse\") == \"railway\": floor[layer].append((g,tmap[\"railways\"]))\n", + " if row.get(\"leisure\") == \"playground\": floor[layer].append((g,tmap[\"grass\"]))\n", + " if row.get(\"playground\") == \"sandpit\": floor[layer].append((g,tmap[\"sand\"]))\n", + " # TODO: more playground details?\n", + " if pd.notnull(row.get(\"parking\")): floor[layer].append((g,tmap[\"parking\"]))\n", + " if row.get(\"highway\") == \"path\":\n", + " surf = tmap[\"path\"]\n", + " #if row.get(\"surface\") in [\"paved\", \"paving_stones\", \"concrete\"]: surf = tmap[\"pedestrian\"]\n", + " # BELOW now. floor[layer+1].extend(shifted(g,surf,.3))\n", + " if row.get(\"highway\") == \"footway\":\n", + " surf = tmap[\"footway\"]\n", + " #if row.get(\"surface\") in [\"paved\", \"paving_stones\", \"concrete\"]: surf = tmap[\"pedestrian\"]\n", + " floor[layer+1].extend(shifted(g,surf,.4))\n", + " if row.get(\"highway\") == \"cycleway\":\n", + " surf = tmap[\"cycleway\"]\n", + " #if row.get(\"surface\") in [\"paved\", \"paving_stones\", \"concrete\"]: surf = tmap[\"pedestrian\"]\n", + " floor[layer+1].extend(shifted(g,surf,.4))\n", + " if row.get(\"highway\") == \"steps\": floor[layer+1].extend(shifted(g,tmap[\"steps\"],.5))\n", + " if isinstance(row[\"geometry\"], Polygon) or isinstance(row[\"geometry\"], MultiPolygon):\n", + " if row.get(\"surface\") == \"paved\": floor[layer].append((g,tmap[\"pedestrian\"]))\n", + " if row.get(\"surface\") == \"paving_stones\": floor[layer].append((g,tmap[\"pedestrian\"]))\n", + " if row.get(\"highway\") == \"pedestrian\": floor[layer+1].append((g,tmap[\"pedestrian\"]))\n", + " #if row.get(\"leisure\") == \"track\": floor[layer+1].extend(shifted(g.exterior,tmap[\"path\"],.35)) # Do not fill!\n", + " if row.get(\"highway\") == \"service\" or row.get(\"highway\") == \"unclassified\":\n", + " surf = tmap[\"service\"]\n", + " #if row.get(\"surface\") in [\"paved\", \"paving_stones\", \"concrete\"]: surf = tmap[\"pedestrian\"]\n", + " floor[layer+2].extend(shifted(g,surf,.5))\n", + " if row.get(\"highway\") == \"residential\":\n", + " surf = tmap[\"residential\"]\n", + " #if row.get(\"surface\") in [\"paved\", \"paving_stones\", \"concrete\"]: surf = tmap[\"pedestrian\"]\n", + " floor[layer+3].extend(shifted(g,surf,1))\n", + " if row.get(\"highway\") == \"tertiary\": floor[layer+4].extend(shifted(g,tmap[\"tertiary\"],1.))\n", + " if row.get(\"highway\") == \"secondary\": floor[layer+4].extend(shifted(g,tmap[\"secondary\"],1.))\n", + " if row.get(\"highway\") == \"primary\": floor[layer+5].extend(shifted(g,tmap[\"primary\"],1.3))\n", + " if row.get(\"highway\") == \"motorway\": floor[layer+5].extend(shifted(g,tmap[\"motorway\"],1.8))\n", + " if row.get(\"highway\") == \"motorway_link\": floor[layer+5].extend(shifted(g,tmap[\"motorway\"],1))\n", + " if pd.notnull(row.get(\"railway\")):\n", + " r = row.get(\"railway\")\n", + " # BELOW. if r not in [\"abandoned\", \"razed\"]: floor[layer].append((g,tmap[\"railway\"]))\n", + " if pd.notnull(row.get(\"building\")):\n", + " floor[layer+100].append((g,tmap[\"indoor\"]))\n", + " floor[layer+101].append((g.exterior,tmap[\"building\"]))\n", + " for l in g.interiors: floor[layer+101].append((l,tmap[\"building\"]))\n", + " f1 = row.get(\"building:levels\")\n", + " bh = int(f1) if isinstance(f1,str) > 0 else 1\n", + " zh = int(zscale*bh) + (1 if zscale >= 2 else 0)\n", + " for i in np.arange(1, zh+.4, .5):\n", + " floor[layer+202].append((shapely.affinity.translate(g.exterior,0,-i),tmap[\"building\"]))\n", + " for l in g.interiors: floor[layer+202].append((shapely.affinity.translate(l,0,-i),tmap[\"building\"]))\n", + " floor[layer+203].append((shapely.affinity.translate(g,0,-zh),tmap[\"roof\"]))\n", + " floor[layer+203].append((shapely.affinity.translate(g.exterior,0,-zh),tmap[\"roof\"]))\n", + " for l in g.interiors: floor[layer+203].append((shapely.affinity.translate(l,0,-i),tmap[\"roof\"]))" ] }, { "cell_type": "code", "execution_count": null, - "id": "inside-arizona", + "id": "activated-waste", "metadata": {}, "outputs": [], "source": [ - "### Horrible abuse of matplotlib below. And does not even work well.\n", - "scale,oversampling=1,3\n", - "dpi=100\n", - "ipm=scale*oversampling/100\n", - "print(\"Area in meters:\",pbe-pbw, pbn-pbs,\" x\",ipm*dpi)\n", - "fw,fh = (pbe-pbw)*ipm, (pbn-pbs)*ipm\n", - "print(\"Expected image resolution:\",fw*dpi,fh*dpi)\n", - "bgfig, ax = plt.subplots(figsize=(fw,fh), dpi=dpi, tight_layout=True, frameon=False)\n", - "ax.axis('off')\n", - "ax.margins(0) # To remove the huge white borders\n", - "plt.box(False)\n", - "ax.set_xlim((pbw,pbe))\n", - "ax.set_ylim((pbs,pbn))\n", - "ax.set_aspect(1)\n", - "bgfig.tight_layout(pad=0)\n", - "\n", - "bbox = ax.get_window_extent().transformed(bgfig.dpi_scale_trans.inverted())\n", - "factor = bbox.width/(pbe-pbw)*bgfig.dpi\n", - "print(\"Figure size:\", bbox.width*bgfig.dpi, bbox.height*bgfig.dpi, factor)\n", - "lw,ms=factor,factor\n", + "### Functions for manual drawing (better lines)\n", + "# Pixel-snapping projection:\n", + "def rint(x): return int(x+0.5) # Runden auf integer\n", + "def project(x,y,bx=0,by=0): return (int(x+bx),int(y+by))\n", + "def proj(x,y,bx=0,by=0): return (x+bx-.5,y+by-.5)\n", "\n", - "##### BACKGROUND only\n", - "# commercial.plot(ax=ax, facecolor='grey')\n", - "if \"geometry\" in commercial: commercial.plot(ax=ax, facecolor='#FFFF00', zorder=-100)\n", - "if \"geometry\" in parking: parking.plot(ax=ax, facecolor='#CCCCCC', zorder=-20)\n", - "if \"geometry\" in pedestrian: pedestrian.plot(ax=ax, color='#CCCC66', linewidth=2*lw, capstyle=\"round\", zorder=-9)\n", - "if \"geometry\" in path: path.plot(ax=ax, color='#CCCC66', zorder=-9) # background fill only now\n", - "#if \"geometry\" in path: path.plot(ax=ax, color='#CCCC66', linewidth=2*lw, capstyle=\"round\", zorder=-9)\n", - "if \"geometry\" in streets: streets.plot(ax=ax, color='#AAAAAA', zorder=-8) # background fill only now\n", - "#if \"geometry\" in streets: streets.plot(ax=ax, color='#AAAAAA', linewidth=6*lw, capstyle=\"round\", zorder=-8)\n", - "if \"geometry\" in roads: roads.plot(ax=ax, color='#AAAAAA', zorder=-8) # background fill only now\n", - "#if \"geometry\" in roads: roads.plot(ax=ax, color='#AAAAAA', linewidth=3*lw, capstyle=\"round\", zorder=-8)\n", - "if \"geometry\" in railway: railway.plot(ax=ax, color='#FF0000', zorder=-8) # areas\n", - "#if \"geometry\" in rail: rail.plot(ax=ax, color='#990000', linewidth=1.5*lw, capstyle=\"round\", zorder=-7)\n", - "#if \"geometry\" in brail: brail.plot(ax=ax, color='#FF0000', linewidth=3*lw, capstyle=\"round\", zorder=-8)\n", - "if \"geometry\" in grass: grass.plot(ax=ax, facecolor='#00CC00', zorder=-15)\n", - "if \"geometry\" in grass2: grass2.plot(ax=ax, facecolor='#00FF00', zorder=-15)\n", - "if \"geometry\" in wood.columns: wood.plot(ax=ax, facecolor='#003300', zorder=-15)\n", - "if \"geometry\" in forest.columns: forest.plot(ax=ax, facecolor='#003300', zorder=-15)\n", - "if \"geometry\" in water.columns: water.plot(ax=ax, facecolor='#000066', zorder=-5)\n", - "#if \"geometry\" in waterway.columns: waterway.plot(ax=ax, color='#000066', linewidth=2*lw, zorder=-5)\n", - "if \"geometry\" in pool.columns: pool.plot(ax=ax, facecolor='#000066', zorder=-5)\n", - "if \"geometry\" in scrub: scrub.plot(ax=ax, facecolor='#99FF00', zorder=-15)\n", - "#if \"geometry\" in trees: trees.plot(ax=ax, color='#990000', markersize=2*ms, zorder=10) # trunks\n", - "if \"geometry\" in buildings: buildings.plot(ax=ax, color='#666666', linewidth=0, zorder=20)\n", - "# Bridges:\n", - "if \"geometry\" in pedestrian and \"layer\" in pedestrian.columns: pedestrian[~pedestrian[\"layer\"].isna()].plot(ax=ax, color='#CCCC66', linewidth=2*lw, capstyle=\"round\", zorder=10)\n", - "if \"geometry\" in path and \"layer\" in path.columns: path[~path[\"layer\"].isna()].plot(ax=ax, color='#CCCC66', linewidth=2*lw, capstyle=\"round\", zorder=10)\n", - "# Walls will be plotted later below\n", - "#if \"geometry\" in buildings: buildings.plot(ax=ax, color='#666666', edgecolor='#000000', linewidth=0.75*lw, zorder=20)\n", - "#if \"entrance\" in entrances: entrances.plot(ax=ax, color='#666666', markersize=1.5*ms, zorder=21) # open entrances\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "subject-container", - "metadata": {}, - "outputs": [], - "source": [ - "#bgfig.savefig(\"test.png\", dpi=dpi, bbox_inches=\"tight\", pad_inches=0)" + "# Simple line drawing:\n", + "def drawfunc(o, c):\n", + " def fn(x,y):\n", + " if x < 0 or x >= o.shape[1] or y < 0 or y >= o.shape[0]: return\n", + " o[y,x] = c\n", + " return fn\n", + "def line(draw, p1, p2):\n", + " x1, y1, x2, y2 = rint(p1[0]), rint(p1[1]), rint(p2[0]), rint(p2[1])\n", + " draw(x2, y2) # LAST point\n", + " if x1 == x2 and y1 == y2: return # degenerated\n", + " dx, dy = p2[0] - p1[0], p2[1] - p1[1]\n", + " if abs(dx) < abs(dy):\n", + " sx, lx, sy = dx / dy, x1, int(np.sign(dy))\n", + " for i in range(y1, y2+sy, sy):\n", + " nx = rint(p1[0]+(i-p1[1])*sx)\n", + " if lx != nx: draw(lx, i)\n", + " draw(nx, i)\n", + " lx = nx\n", + " elif abs(dy) > 0:\n", + " sy, ly, sx = dy / dx, y1, int(np.sign(dx))\n", + " for i in range(x1, x2+sx, sx):\n", + " ny = rint(p1[1]+(i-p1[0])*sy)\n", + " if ly != ny: draw(i, ly)\n", + " draw(i, ny)\n", + " ly = ny\n", + " else:\n", + " sx = int(np.sign(dx))\n", + " for i in range(x1, x2+sx, sx): draw(i, y1)\n", + "def poly(draw, coords, off=None):\n", + " for i in range(len(coords) - 1):\n", + " p1, p2 = proj(*coords[i]), proj(*coords[i+1])\n", + " if off: p1, p2 = (p1[0] + off[0], p1[1] + off[1]), (p2[0] + off[0], p2[1] + off[1])\n", + " line(draw, p1, p2)" ] }, { "cell_type": "code", "execution_count": null, - "id": "relative-monroe", + "id": "checked-strategy", "metadata": {}, "outputs": [], "source": [ - "bgimg = fig_to_numpy(bgfig, bgfig.dpi)\n", - "# By default STUPID MATPLOTLIB gets the size wrong.\n", - "f = np.mean([(pbe-pbw)*dpi*ipm/bgimg.shape[1],(pbn-pbs)*dpi*ipm/bgimg.shape[0]])\n", - "bgimg = fig_to_numpy(bgfig, bgfig.dpi * f)\n", - "#f = f * np.mean([(pbe-pbw)*dpi*ipm/bgimg.shape[1],(pbn-pbs)*dpi*ipm/bgimg.shape[0]])\n", - "#bgimg = fig_to_numpy(bgfig, bgfig.dpi * f)\n", - "print((pbe-pbw)*dpi*ipm, (pbn-pbs)*dpi*ipm, bgimg.shape)\n", - "assert abs(bgimg.shape[0]-(pbn-pbs)*dpi*ipm)<=1\n", - "assert abs(bgimg.shape[1]-(pbe-pbw)*dpi*ipm)<=1" + "# Rasterize with rasterio first:\n", + "rasters = dict()\n", + "for k in sorted(floor.keys()):\n", + " print(k, Counter([y for x,y in floor[k]]))\n", + " rasters[k] = rasterize(floor[k], (phei,pwid))" ] }, { "cell_type": "code", "execution_count": null, - "id": "established-driving", + "id": "congressional-colony", "metadata": {}, "outputs": [], "source": [ - "# Read the template file, which has the tiles to be used\n", - "import json\n", - "tfile = \"generated/template%d.json\" % (1 if scale < 1 else 2)\n", - "with open(tfile) as f: templ=json.load(f)\n", - "tvals = templ[\"layers\"][0][\"data\"]" + "# Overdraw with our own line drawing algorithm next (no diagonal-only connected points):\n", + "for index, row in gdf.iterrows():\n", + " g, k, layer, level = row[\"geometry\"], row[\"element_type\"], row[\"layer\"], row[\"level\"]\n", + " layer = 10*int(layer) if pd.notnull(layer) else 0\n", + " level = int(re.split(r\"[;-]\", level)[-1]) if pd.notnull(level) else 0\n", + " if layer < 0: continue # Underground\n", + "\n", + " # Draw small paths:\n", + " if row.get(\"highway\") == \"path\" or row.get(\"leisure\") == \"track\":\n", + " surf = tmap[\"path\"]\n", + " #if row.get(\"surface\") in [\"paved\", \"paving_stones\", \"concrete\"]: surf = tmap[\"pedestrian\"]\n", + " if isinstance(row[\"geometry\"], LineString):\n", + " if rasters.get(layer) is None: rasters[layer] = np.zeros((phei,pwid), np.int16)\n", + " poly(drawfunc(rasters.get(layer), surf), row[\"geometry\"].coords)\n", + " elif isinstance(row[\"geometry\"], Polygon):\n", + " if rasters.get(layer) is None: rasters[layer] = np.zeros((phei,pwid), np.int16)\n", + " poly(drawfunc(rasters.get(layer), surf), row[\"geometry\"].exterior.coords)\n", + " # Draw waterways\n", + " if pd.notnull(row.get(\"waterway\")):\n", + " if isinstance(row[\"geometry\"], LineString):\n", + " if rasters.get(layer) is None: rasters[layer] = np.zeros((phei,pwid), np.int16)\n", + " poly(drawfunc(rasters.get(layer), tmap[\"waterway\"]), row[\"geometry\"].coords)\n", + "\n", + " # Draw train tracks:\n", + " if pd.notnull(row.get(\"railway\")):\n", + " if row.get(\"railway\") in [\"abandoned\", \"razed\"]: continue\n", + " if isinstance(row[\"geometry\"], Point): continue\n", + " if isinstance(row[\"geometry\"], Polygon): continue # rendered above\n", + " if isinstance(row[\"geometry\"], MultiPolygon): continue # rendered above\n", + " if isinstance(row[\"geometry\"], LineString):\n", + " if rasters.get(layer) is None: rasters[layer] = np.zeros((phei,pwid), np.int16)\n", + " poly(drawfunc(rasters.get(layer), tmap[\"railway\"]), row[\"geometry\"].coords)\n", + " continue\n", + " print(row.dropna())\n" ] }, { "cell_type": "code", "execution_count": null, - "id": "hindu-municipality", + "id": "valued-empty", "metadata": {}, "outputs": [], "source": [ - "def simple(i):\n", - " i = tvals[i]\n", - " return lambda y,x,m: i\n", - "#def mod2(i):\n", - "# i = tvals[i]\n", - "# return lambda y,x,m: i+((x+y)%2)\n", - "#def wall(i,j):\n", - "# i,j = tvals[i],tvals[j]\n", - "# return lambda y,x,m: i if y+1<m.shape[0] and m[y+1,x] != 1 else j\n", - "### TODO: use the third column for some random decorations?\n", - "cmap = [\n", - "('#FFFFFF', simple(0), None), # Unknown\n", - "('#000000', simple(25), None), # Building wall. Index 1 hardcoded above!\n", - "('#666666', simple(23), None), # Building indoors. Index 2 hardcoded below!\n", - "('#FFFF00', simple(3), None), # Commercial background\n", - "('#CCCCCC', simple(8), None), # Parking\n", - "('#CCCC66', simple(5), None), # Path\n", - "('#AAAAAA', simple(24), None), # Street, road\n", - "('#FF0000', simple(22), None), # Rail areas\n", - "('#990000', simple(16), None), # Rail tracks\n", - "('#00CC00', simple(2), None), # Grass1\n", - "('#00FF00', simple(1), None), # Grass2\n", - "('#99FF00', simple(4), None), # Scrub\n", - "('#000066', simple(11), None), # Water\n", - "('#003300', simple(27), None), # Forest\n", - "#('#990000', None, None), # Tree runk, not in base layer\n", - "#('#004400', None, None), # Tree, not in base layer\n", - "#('#FFFF00', None, None), # Building entrance, not in base layer\n", - "]" + "if True:\n", + " for k, r in sorted(rasters.items()):\n", + " fig, ax = plt.subplots(figsize=(pwid/100,phei/100), dpi=100, tight_layout=True, frameon=False)\n", + " ax.axis('off'); ax.margins(0) # To remove the huge white borders\n", + " plt.box(False); ax.set_aspect(1)\n", + " plt.imshow(r, interpolation=\"nearest\")\n", + " plt.show();" ] }, { "cell_type": "code", "execution_count": null, - "id": "smoking-august", + "id": "outdoor-domain", "metadata": {}, "outputs": [], "source": [ - "from matplotlib.colors import to_rgb\n", - "colors = []\n", - "for e in cmap: colors.append(to_rgb(e[0]))\n", - "colors = np.array(colors)" + "# Combine into just two layers: base and walls\n", + "combined, walllayer = np.zeros((phei,pwid), dtype=np.int16), np.zeros((phei,pwid), dtype=np.int16)\n", + "for k in sorted(rasters.keys()):\n", + " r = rasters[k]\n", + " #if k < 0:\n", + " #combined[(r != 0) & (r < 10)] = r[(r != 0) & (r < 10)] # avoid underground stations\n", + " #continue\n", + " onto = combined if k < 200 else walllayer\n", + " onto[r != 0] = r[r != 0]\n", + "# Show result\n", + "fig, ax = plt.subplots(figsize=(pwid/100,phei/100), dpi=100, tight_layout=True, frameon=False)\n", + "ax.axis('off'); ax.margins(0) # To remove the huge white borders\n", + "plt.box(False); ax.set_aspect(1)\n", + "plt.imshow(combined, interpolation=\"nearest\")\n", + "plt.show();\n", + "fig, ax = plt.subplots(figsize=(pwid/100,phei/100), dpi=100, tight_layout=True, frameon=False)\n", + "ax.axis('off'); ax.margins(0) # To remove the huge white borders\n", + "plt.box(False); ax.set_aspect(1)\n", + "plt.imshow(walllayer, interpolation=\"nearest\")\n", + "plt.show();" ] }, { "cell_type": "code", "execution_count": null, - "id": "separated-conditions", + "id": "backed-cheese", "metadata": {}, "outputs": [], "source": [ - "#### Map PNG back to our types\n", - "from sklearn.metrics.pairwise import manhattan_distances as dist\n", - "stepx, stepy = oversampling, oversampling*2 #int(ipm*dpi)\n", - "closest=dist(bgimg.reshape(-1, 4)[:,:3], colors).argmin(axis=1).reshape(bgimg.shape[:2])\n", - "# Downsampling for base layer\n", - "downs = np.zeros((closest.shape[0]//stepy,closest.shape[1]//stepx),dtype=np.int16)\n", - "for y, x in np.ndindex(downs.shape):\n", - " tmp = np.bincount(closest[y*stepy:y*stepy+stepy,x*stepx:x*stepx+stepx].reshape(-1))\n", - " if len(tmp)>=2 and tmp[2] < tmp.sum(): tmp[2] -= 2 # Be conservative about indoors\n", - " downs[y,x] = tmp.argmax()" + "entrances=gdf[~gdf[\"entrance\"].isna()]\n", + "tables=gdf[(gdf[\"leisure\"]==\"picnic_table\")] if \"leisure\" in gdf else geopandas.GeoDataFrame()\n", + "benches=gdf[(gdf[\"amenity\"]==\"bench\")] if \"amenity\" in gdf else geopandas.GeoDataFrame()\n", + "trees = gdf[gdf[\"natural\"] == 'tree']\n", + "artwork = gdf[gdf[\"tourism\"] == 'artwork'] if \"tourism\" in gdf else geopandas.GeoDataFrame()\n", + "signs = gdf[gdf[\"tourism\"] == 'information'] if \"tourism\" in gdf else geopandas.GeoDataFrame()\n", + "lamps = gdf[gdf[\"highway\"] == 'street_lamp']\n", + "busstops = gdf[gdf[\"highway\"] == 'bus_stop']\n", + "trainstops = gdf[(gdf[\"railway\"] == 'halt') | (gdf[\"railway\"] == 'stop') | (gdf[\"railway\"] == 'station')]\n", + "wastes = gdf[gdf[\"amenity\"] == 'waste_basket'] if \"amenity\" in gdf else geopandas.GeoDataFrame()\n", + "postboxes = gdf[gdf[\"amenity\"] == 'post_box'] if \"amenity\" in gdf else geopandas.GeoDataFrame()\n", + "atms = gdf[gdf[\"amenity\"] == 'atm'] if \"amenity\" in gdf else geopandas.GeoDataFrame()\n", + "bicycles = gdf[gdf[\"amenity\"] == 'bicycle_parking'] if \"amenity\" in gdf else geopandas.GeoDataFrame()\n", + "bicycles2 = gdf[gdf[\"amenity\"] == 'bicycle_rental'] if \"amenity\" in gdf else geopandas.GeoDataFrame()\n", + "fountain = gdf[gdf[\"amenity\"] == 'fountain'] if \"amenity\" in gdf else geopandas.GeoDataFrame() # TODO!\n", + "fountain2 = gdf[gdf[\"amenity\"] == 'drinking_water'] if \"amenity\" in gdf else geopandas.GeoDataFrame() # TODO!\n", + "bollards = gdf[gdf[\"barrier\"] == 'bollard']\n", + "barriers = gdf[gdf[\"barrier\"] == 'lift_gate']\n", + "# TODO: playground features\n", + "# TODO: amenity=pub,cafe,fast_food,restaurant,bank etc." ] }, { "cell_type": "code", "execution_count": null, - "id": "diverse-therapist", + "id": "established-driving", "metadata": {}, "outputs": [], "source": [ - "fig, ax = plt.subplots(figsize=(fw,fh), dpi=dpi, tight_layout=True, frameon=True)\n", - "plt.axis('off')\n", - "ax.margins(x=0,y=0)\n", - "ax.set_aspect(1)\n", - "ax.imshow(colors[downs]);" + "# Read the template file, which has the tiles to be used\n", + "import json\n", + "tfile = \"generated/template%d.json\" % (1 if zscale <= 1 else 2)\n", + "with open(tfile) as f: templ=json.load(f)\n", + "tvals = np.array(templ[\"layers\"][0][\"data\"]).reshape((-1,10))" ] }, { "cell_type": "code", "execution_count": null, - "id": "married-contemporary", + "id": "hindu-municipality", "metadata": {}, "outputs": [], "source": [ - "# Base layer and decoration layer:\n", - "mdowns = np.zeros(downs.shape, np.int16)\n", - "mdecos = np.zeros(downs.shape, np.int16)\n", - "mupper = np.zeros(downs.shape, np.int16)\n", - "mwalls = np.zeros(downs.shape, np.int16)\n", - "mwdeco = np.zeros(downs.shape, np.int16)\n", - "for y,x in np.ndindex(downs.shape):\n", - " f = cmap[downs[y,x]]\n", - " if f[1]: mdowns[y,x] = f[1](y,x,downs)\n", - " # currently not used: if f[2]: mdecos[y,x] = f[2](y,x,decos)" + "cmap = {\n", + " # \"commercial\": -1,\n", + " \"bg\": 3,\n", + " \"scrub\": 4,\n", + " \"grass\": 1,\n", + " \"grassland\": 0,\n", + " \"meadow\": 2,\n", + " \"forest\": 11,\n", + " \"water\": 12,\n", + " \"waterway\": 13,\n", + " \"sand\": 6,\n", + " \"garden\": 14,\n", + " \"path\": 5,\n", + " \"footway\": 5,\n", + " \"pedestrian\": 15,\n", + " \"cycleway\": 5,\n", + " \"steps\": 20,\n", + " \"parking\": 8,\n", + " \"service\": 18,\n", + " \"residential\": 18,\n", + " \"tertiary\": 18,\n", + " \"secondary\": 18,\n", + " \"primary\": 18,\n", + " \"motorway\": 18,\n", + " \"railways\": 16,\n", + " \"railway\": 10,\n", + " \"building\": 19,\n", + " \"indoor\": 17,\n", + " \"roof\": 9,\n", + "}\n", + "# Translation map from pixels to template\n", + "transmap = dict()\n", + "for k,v in tmap.items(): transmap[v] = tvals[cmap[k] // 10, cmap[k] % 10]" ] }, { "cell_type": "code", "execution_count": null, - "id": "activated-waste", - "metadata": {}, - "outputs": [], - "source": [ - "h,w = mdowns.shape\n", - "fx,fy=(w)/(pbe-pbw),(h)/(pbn-pbs)\n", - "ox,oy=pbw+0.5/fx,pbn-0.5/fy\n", - "print(fx,fy,ox,pbw,oy,pbs)\n", - "\n", - "# Pixel-snapping projection:\n", - "def rint(x): return int(x+0.5) # Runden auf integer\n", - "def project(x,y,bx=0,by=0): return rint((x-ox)*fx+bx), rint((oy-y)*fy+by) # gerundet!\n", - "def proj(x,y,bx=0,by=0): return (x-ox)*fx+bx, (oy-y)*fy+by\n", - "\n", - "walltop, wallbot = tvals[9], tvals[25]\n", - "# Simple line drawing:\n", - "def drawfunc(o, c):\n", - " def fn(x,y):\n", - " if x < 0 or x >= o.shape[1] or y < 0 or y >= o.shape[0]: return\n", - " o[y,x] = c\n", - " return fn\n", - "def line(draw, p1, p2):\n", - " x1, y1, x2, y2 = int(p1[0]+.5), int(p1[1]+.5), int(p2[0]+.5), int(p2[1]+.5)\n", - " draw(x2, y2) # LAST point\n", - " if x1 == x2 and y1 == y2: return # degenerated\n", - " dx, dy = p2[0] - p1[0], p2[1] - p1[1]\n", - " if abs(dx) < abs(dy):\n", - " sx, lx, sy = dx / dy, x1, int(np.sign(dy))\n", - " for i in range(y1, y2+sy, sy):\n", - " nx = int(p1[0]+(i-p1[1])*sx+0.5)\n", - " if lx != nx: draw(lx, i)\n", - " draw(nx, i)\n", - " lx = nx\n", - " elif abs(dy) > 0:\n", - " sy, ly, sx = dy / dx, y1, int(np.sign(dx))\n", - " for i in range(x1, x2+sx, sx):\n", - " ny = int(p1[1]+(i-p1[0])*sy+0.5)\n", - " if ly != ny: draw(i, ly)\n", - " draw(i, ny)\n", - " ly = ny\n", - " else:\n", - " sx = int(np.sign(dx))\n", - " for i in range(x1, x2+sx, sx): draw(i, y1)\n", - "def poly(draw, coords, off=None):\n", - " for i in range(len(coords) - 1):\n", - " p1, p2 = proj(*coords[i]), proj(*coords[i+1])\n", - " if off: p1, p2 = (p1[0] + off[0], p1[1] + off[1]), (p2[0] + off[0], p2[1] + off[1])\n", - " line(draw, p1, p2)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "attached-baker", + "id": "separated-conditions", "metadata": {}, "outputs": [], "source": [ - "# Draw Waterways\n", - "drawwater = drawfunc(mdowns, tvals[11])\n", - "for p in waterway.get(\"geometry\",[]):\n", - " if isinstance(p, Polygon):\n", - " poly(drawwater, p.exterior.coords)\n", - " for i in p.interiors: poly(drawwater, i.coords)\n", - " elif isinstance(p, LineString): poly(drawwater, p.coords)\n", - " else: print(type(p))" + "mdowns = np.array([transmap.get(x) for x in combined.flatten()], dtype=np.int16).reshape(combined.shape)\n", + "mwalls = np.array([transmap.get(x) if x > 0 else 0 for x in walllayer.flatten()], dtype=np.int16).reshape(walllayer.shape)" ] }, { "cell_type": "code", "execution_count": null, - "id": "supposed-eugene", + "id": "diverse-therapist", "metadata": {}, "outputs": [], "source": [ - "# Draw Rails\n", - "drawrail = drawfunc(mdowns, tvals[16])\n", - "for p in rail.get(\"geometry\",[]):\n", - " if isinstance(p, Polygon):\n", - " poly(drawrail, p.exterior.coords)\n", - " for i in p.interiors: poly(drawrail, i.coords)\n", - " elif isinstance(p, LineString): poly(drawrail, p.coords)\n", - " else: print(type(p))" + "fig, ax = plt.subplots(figsize=(pwid/100,phei/100), dpi=100, tight_layout=True, frameon=True)\n", + "plt.axis('off')\n", + "ax.margins(x=0,y=0)\n", + "ax.set_aspect(1)\n", + "ax.imshow(mdowns);" ] }, { "cell_type": "code", "execution_count": null, - "id": "swiss-master", + "id": "married-contemporary", "metadata": {}, "outputs": [], "source": [ - "# Draw Paths\n", - "drawpath = drawfunc(mdowns, tvals[5])\n", - "for p in path.get(\"geometry\",[]):\n", - " if isinstance(p, Polygon): continue # render as background polygons above\n", - " # poly(drawpath, p.exterior.coords)\n", - " # for i in p.interiors: poly(drawpath, i.coords)\n", - " if isinstance(p, LineString): poly(drawpath, p.coords)\n", - " else: print(type(p))\n" + "# Decoration layer:\n", + "mdecos = np.zeros(mdowns.shape, np.int16)\n", + "mupper = np.zeros(mdowns.shape, np.int16)\n", + "mwdeco = np.zeros(mdowns.shape, np.int16)" ] }, { "cell_type": "code", "execution_count": null, - "id": "antique-tribe", + "id": "natural-creation", "metadata": {}, "outputs": [], "source": [ - "# Draw roads again. TODO: width!\n", - "# drawroad = drawfunc(mdowns, tvals[24])\n", - "def drawroad(x,y):\n", - " if x < 0 or x >= mdowns.shape[1] or y < 0 or y >= mdowns.shape[0]: return\n", - " if downs[y,x] == 2: return # don't draw roads inside\n", - " mdowns[y,x] = tvals[24]\n", - "\n", - "for p in roads.get(\"geometry\",[]):\n", - " if isinstance(p, Polygon): continue # render as background polygons above\n", - " if isinstance(p, LineString):\n", - " poly(drawroad, p.coords, off=(-.5,-.5))\n", - " poly(drawroad, p.coords, off=(+.5,-.5))\n", - " poly(drawroad, p.coords, off=(-.5,+.5))\n", - " poly(drawroad, p.coords, off=(+.5,+.5))\n", - " else: print(type(p))\n", - "\n", - "for p in streets.get(\"geometry\",[]):\n", - " if isinstance(p, Polygon): continue # render as background polygons above\n", - " if isinstance(p, LineString):\n", - " # Poor mans line width. Do this *much* more nicely!\n", - " #poly(drawroad, p.coords, off=(-1.5,-1.5))\n", - " #poly(drawroad, p.coords, off=(-0.5,-1.5))\n", - " #poly(drawroad, p.coords, off=(+0.5,-1.5))\n", - " #poly(drawroad, p.coords, off=(+1.5,-1.5))\n", - " #poly(drawroad, p.coords, off=(-1.5,-0.5))\n", - " poly(drawroad, p.coords, off=(-0.5,-0.5))\n", - " poly(drawroad, p.coords, off=(+0.5,-0.5))\n", - " #poly(drawroad, p.coords, off=(+1.5,-0.5))\n", - " #poly(drawroad, p.coords, off=(-1.5,+0.5))\n", - " poly(drawroad, p.coords, off=(-0.5,+0.5))\n", - " poly(drawroad, p.coords, off=(+0.5,+0.5))\n", - " #poly(drawroad, p.coords, off=(+1.5,+0.5))\n", - " #poly(drawroad, p.coords, off=(-1.5,+1.5))\n", - " #poly(drawroad, p.coords, off=(-0.5,+1.5))\n", - " #poly(drawroad, p.coords, off=(+0.5,+1.5))\n", - " #poly(drawroad, p.coords, off=(+1.5,+1.5))\n", - " else: print(type(p))\n" + "# Draw doors\n", + "floor = tvals[1,7] # Floor tile below doors\n", + "door = tvals[6:8,5]\n", + "for p in entrances.get(\"geometry\", []):\n", + " tx,ty = project(p.x, p.y, 0, -1) #rint((p.x-ox) * fx), rint((oy-p.y) * fy - 1)\n", + " #### We could also try snapping to the nearest wall here!\n", + " #print(p.x,p.y,\"->\",tx,ty)\n", + " if tx < 0 or tx >= mwdeco.shape[1]: continue\n", + " if ty < 0 or ty+1 >= mwdeco.shape[0]: continue\n", + " if mdecos[ty:ty+2,tx].sum() > 0: continue\n", + " o = 0 if door[0] > 0 else 1\n", + " mdowns[ty+o:ty+2,tx] = floor # to ensure walkable\n", + " mdecos[ty+o:ty+2,tx] = door[o:]\n", + " # Walls:\n", + " #if ty+3 >= mwdeco.shape[0] or mwalls[ty+2,tx] == 0: mwdeco[ty+o:ty+2,tx] = door[o:]" ] }, { "cell_type": "code", "execution_count": null, - "id": "cultural-private", + "id": "funny-needle", "metadata": {}, "outputs": [], "source": [ - "zscale=1 if scale < 1 else 2\n", - "# Draw walls\n", - "walltop, wallbot = tvals[9], tvals[25]\n", - "# OLD ALTERNATIVE: trivial outline detection\n", - "# Note: index 2 = building interior hardcoded.\n", - "if False:\n", - " for y,x in np.ndindex(mdowns.shape):\n", - " if downs[y,x]!=2: continue # not wall\n", - " neighbors = downs[max(0,y-1):min(h,y+2),max(0,x-1):min(w,x+2)]\n", - " if (neighbors!=2).any(): mdowns[y,x] = wallbot\n", - " #if (neighbors!=2).any(): mwalls[y,x] = wallbot\n", - " #for y,x in np.ndindex(mdowns.shape):\n", - " # if mdowns[y,x]!=wallbot and mdowns[y,x]!=walltop: continue # no wall below\n", - " # if y+1==h or mdowns[y+1,x] == wallbot: mdowns[y,x] = walltop\n", - "\n", - "mwalls[mdowns == tvals[23]] = tvals[9] # Use building indoors as initial roof.\n", - "\n", - "drawwallb = drawfunc(mdowns, wallbot)\n", - "drawwallt = drawfunc(mwalls, walltop)\n", - "def drawwall(x,y):\n", - " if x < 0 or x >= mwalls.shape[1] or y < 0 or y >= mwalls.shape[0]: return\n", - " mwalls[y,x] = walltop if y+1< mwalls.shape[0] and mwalls[y+1,x] == walltop else wallbot\n", - "\n", - "for _, b in buildings.iterrows():\n", - " p=b[\"geometry\"]\n", - " if not p: continue\n", - " f1 = b.get(\"building:levels\")\n", - " bh = int(f1) if isinstance(f1,str) > 0 else 1\n", - " if isinstance(p, Polygon):\n", - " poly(drawwallb, p.exterior.coords)\n", - " for q in p.interiors: poly(drawwallb, q.coords)\n", - " zh = int(zscale*bh) + (1 if zscale >= 2 else 0)\n", - " for i in range(0, zh+1):\n", - " t = drawwall if i < zh else drawwallt\n", - " poly(t, p.exterior.coords, off=(0,-i))\n", - " for q in p.interiors: poly(t, q.coords, off=(0,-i))\n" + "# Draw bus stops\n", + "busstop = tvals[4,6]\n", + "for p in busstops.get(\"geometry\", []):\n", + " tx,ty = project(p.x,p.y)\n", + " if tx < 0 or tx >= mdecos.shape[1]: continue\n", + " if ty < 0 or ty >= mdecos.shape[0]: continue\n", + " if mdecos[ty,tx] == 0: mdecos[ty,tx] = busstop\n", + "# Draw train stops\n", + "for p in trainstops.get(\"geometry\", []):\n", + " tx,ty = project(p.x,p.y)\n", + " if tx < 0 or tx >= mdecos.shape[1]: continue\n", + " if ty < 0 or ty >= mdecos.shape[0]: continue\n", + " if mdecos[ty,tx] == 0: mdecos[ty,tx] = busstop\n", + "# Draw bicycle parkings\n", + "bicycle = tvals[7,8:10]\n", + "for p in bicycles.get(\"geometry\", []):\n", + " if isinstance(p,Polygon): p = p.centroid\n", + " tx,ty = project(p.x,p.y,-.5,0)\n", + " if tx < 0 or tx+1 >= mdecos.shape[0] or ty < 0 or ty+1 >= mdecos.shape[0]: continue\n", + " if mdecos[ty,tx:tx+2].sum() == 0: mdecos[ty,tx:tx+2] = bicycle\n", + "for p in bicycles2.get(\"geometry\", []): # renting stations\n", + " if isinstance(p,Polygon): p = p.centroid\n", + " tx,ty = project(p.x,p.y,-.5,0)\n", + " if tx < 0 or tx+1 >= mdecos.shape[0] or ty < 0 or ty+1 >= mdecos.shape[0]: continue\n", + " if mdecos[ty,tx:tx+2].sum() == 0: mdecos[ty,tx:tx+2] = bicycle" ] }, { "cell_type": "code", "execution_count": null, - "id": "industrial-consumption", + "id": "fifty-animation", "metadata": {}, "outputs": [], "source": [ - "# Draw doors\n", - "floor = tvals[23] # Floor tile below doors\n", - "door = np.array([[tvals[10]],[tvals[26]]], dtype=np.int16)\n", - "for p in entrances.get(\"geometry\", []):\n", - " tx,ty = project(p.x, p.y, 0, -1) #rint((p.x-ox) * fx), rint((oy-p.y) * fy - 1)\n", - " #### TODO: Building height\n", - " #### We could also try snapping to the nearest wall here!\n", - " #print(p.x,p.y,\"->\",tx,ty)\n", - " if tx < 0 or tx >= w: continue\n", - " if ty < 0 or ty+1 >= h: continue\n", - " if mdecos[ty:ty+2,tx:tx+1].sum() > 0: continue\n", - " mdowns[ty:ty+2,tx:tx+1] = floor # to ensure walkable\n", - " mdecos[ty:ty+2,tx:tx+1] = door\n", - " if ty+3 >= h or mwalls[ty+2,tx] == 0: mwdeco[ty:ty+2,tx:tx+1] = door" + "# Draw artwork\n", + "art = tvals[5:8,4]\n", + "for p in artwork.get(\"geometry\", []):\n", + " if isinstance(p,Polygon): p = p.centroid\n", + " if isinstance(p,LineString): continue\n", + " tx,ty = project(p.x,p.y,0,-2)\n", + " if tx < 0 or tx >= mdecos.shape[1] or ty < 0 or ty+3 >= mdecos.shape[0]: continue\n", + " o = 0 if art[0] > 0 else 1\n", + " if mdecos[ty+o:ty+3,tx].sum() == 0:\n", + " mdecos[ty+o:ty+3,tx] = art[o:]\n", + " elif mdecos[ty+2,tx] == 0: mdecos[ty+2,tx] = art[2]\n", + "# Draw fountains\n", + "fount = tvals[5:8,0:3]\n", + "for p in fountain.get(\"geometry\", []):\n", + " if isinstance(p,Polygon): p = p.centroid\n", + " if isinstance(p,LineString): continue\n", + " tx,ty = project(p.x,p.y,-1,-1)\n", + " if tx < 0 or tx+3 >= mdecos.shape[1] or ty < 0 or ty+3 >= mdecos.shape[0]: continue\n", + " if mdecos[ty:ty+3,tx:tx+3].sum() == 0:\n", + " mdecos[ty:ty+3,tx:tx+3] = fount\n", + "fount2 = tvals[6:8,7]\n", + "for p in fountain2.get(\"geometry\", []):\n", + " if isinstance(p,Polygon): p = p.centroid\n", + " if isinstance(p,LineString): continue\n", + " tx,ty = project(p.x,p.y,0,-1)\n", + " if tx < 0 or tx >= mdecos.shape[1] or ty < 0 or ty+2 >= mdecos.shape[0]: continue\n", + " if mdecos[ty:ty+2,tx].sum() == 0:\n", + " mdecos[ty:ty+2,tx] = fount2" ] }, { @@ -617,89 +629,92 @@ "metadata": {}, "outputs": [], "source": [ + "# Draw sign\n", + "sign = tvals[6:8,6]\n", + "smallsign = tvals[5,6]\n", + "for p in signs.get(\"geometry\", []):\n", + " if isinstance(p,Polygon): p = p.centroid\n", + " tx,ty = project(p.x,p.y,0,-1)\n", + " if tx < 0 or tx+1 >= mdecos.shape[1] or ty < 0 or ty+1 >= mdecos.shape[0]: continue\n", + " if mdecos[ty:ty+2,tx].sum() == 0:\n", + " mdecos[ty:ty+2,tx] = sign\n", + " elif mdecos[ty+1,tx] == 0: mdecos[ty+1,tx] = smallsign\n", "# Draw trees\n", - "tree = np.array([[tvals[12],tvals[13]],[tvals[28],tvals[29]]], dtype=np.int16)\n", - "smalltree = tvals[21]\n", + "tree = tvals[3:5,0:2]\n", + "smalltree = tvals[2,1]\n", "for p in trees.get(\"geometry\", []):\n", " tx,ty = project(p.x,p.y,-.5,-1) #rint((p.x-ox) * fx-0.5), rint((oy-p.y) * fy - 1)\n", " #print(p.x,p.y,\"->\",tx,ty)\n", - " if tx < 0 or tx+1 >= w or ty < 0 or ty+1 >= h: continue\n", + " if tx < 0 or tx+1 >= mdecos.shape[1] or ty < 0 or ty+1 >= mdecos.shape[0]: continue\n", " if mdecos[ty:ty+2,tx:tx+2].sum() == 0:\n", " mdecos[ty:ty+2,tx:tx+2] = tree\n", " continue\n", " tx,ty = project(p.x,p.y)\n", " if mdecos[ty,tx] == 0: mdecos[ty,tx] = smalltree\n", + "# Draw lamps\n", + "lamp = tvals[5:8,3]\n", + "for p in lamps.get(\"geometry\", []):\n", + " tx,ty = project(p.x,p.y,0,-2)\n", + " if tx < 0 or tx+3 >= mdecos.shape[1] or ty < 0 or ty+3 >= mdecos.shape[0]: continue\n", + " o = 0 if lamp[0] > 0 else 1\n", + " if mdecos[ty+o:ty+3,tx].sum() == 0:\n", + " mdecos[ty+o:ty+3,tx] = lamp[o:]\n", + " elif mdecos[ty:ty+2,tx].sum() == 0: mdecos[ty:ty+2,tx] = [lamp[0],lamp[2]]\n", "# Draw benches\n", - "bench = np.array([tvals[17],tvals[18]], dtype=np.int16)\n", - "stool = tvals[19]\n", + "bench = tvals[5,8:10]\n", + "stool = tvals[4,8]\n", "for p in benches.get(\"geometry\", []):\n", + " if isinstance(p,Polygon): p = p.centroid\n", + " if isinstance(p,LineString): continue\n", " tx,ty = project(p.x,p.y,-.5,0)\n", - " if tx < 0 or tx+1 >= w or ty < 0 or ty+1 >= h: continue\n", + " if tx < 0 or tx+1 >= mdecos.shape[1] or ty < 0 or ty+1 >= mdecos.shape[0]: continue\n", " if mdecos[ty,tx:tx+2].sum() == 0:\n", " mdecos[ty,tx:tx+2] = bench\n", " continue\n", " tx,ty = project(p.x,p.y)\n", " if mdecos[ty,tx] == 0: mdecos[ty,tx] = stool\n", "# Draw tables\n", - "table = np.array([tvals[33],tvals[34],tvals[33]], dtype=np.int16)\n", + "table = np.array([tvals[4,8],tvals[4,9],tvals[4,8]], dtype=np.int16)\n", "for p in tables.get(\"geometry\", []):\n", + " if isinstance(p,Polygon): p = p.centroid\n", + " if isinstance(p,LineString): continue\n", " tx,ty = project(p.x,p.y,-1,0)\n", - " if tx < 0 or tx+2 >= w or ty < 0 or ty+2 >= h: continue\n", + " if tx < 0 or tx+2 >= mdecos.shape[1] or ty < 0 or ty+2 >= mdecos.shape[0]: continue\n", " if mdecos[ty,tx:tx+3].sum() == 0:\n", " mdecos[ty,tx:tx+3] = table\n", " elif mdecos[ty,tx+1] == 0: mdecos[ty,tx:tx+3] = table[1]\n", - "# Draw artwork\n", - "art = np.array([tvals[15],tvals[31],tvals[47]], dtype=np.int16)\n", - "for p in artwork.get(\"geometry\", []):\n", - " tx,ty = project(p.x,p.y,0,-2)\n", - " if tx < 0 or tx+3 >= w or ty < 0 or ty+3 >= h: continue\n", - " if mdecos[ty:ty+3,tx].sum() == 0:\n", - " mdecos[ty:ty+3,tx] = art\n", - " elif mdecos[ty+2,tx] == 0: mdecos[ty+2,tx] = art[2]\n", - "# Draw sign\n", - "sign = np.array([tvals[19],tvals[35]], dtype=np.int16)\n", - "smallsign = tvals[32]\n", - "for p in signs.get(\"geometry\", []):\n", - " tx,ty = project(p.x,p.y,0,-1)\n", - " if tx < 0 or tx+1 >= w or ty < 0 or ty+1 >= h: continue\n", - " if mdecos[ty:ty+2,tx].sum() == 0:\n", - " mdecos[ty:ty+2,tx] = sign\n", - " elif mdecos[ty+1,tx] == 0: mdecos[ty+1,tx] = smallsign\n", - "# Draw lamps\n", - "lamp = np.array([tvals[14],tvals[30],tvals[46]], dtype=np.int16)\n", - "for p in lamps.get(\"geometry\", []):\n", - " tx,ty = project(p.x,p.y,0,-2)\n", - " if tx < 0 or tx+3 >= w or ty < 0 or ty+3 >= h: continue\n", - " if mdecos[ty:ty+3,tx].sum() == 0:\n", - " mdecos[ty:ty+3,tx] = lamp\n", - " elif mdecos[ty:ty+2,tx].sum() == 0: mdecos[ty:ty+2,tx] = [lamp[0],lamp[2]]\n", - "# Draw bus stop\n", - "busstop = tvals[38]\n", - "for p in busstops.get(\"geometry\", []):\n", - " tx,ty = project(p.x,p.y)\n", - " if tx < 0 or tx >= w: continue\n", - " if ty < 0 or ty >= h: continue\n", - " if mdecos[ty,tx] == 0: mdecos[ty,tx] = busstop\n", "# Draw waste buckets\n", - "waste = tvals[37]\n", + "waste = tvals[3,9]\n", "for p in wastes.get(\"geometry\", []):\n", " tx,ty = project(p.x,p.y)\n", - " if tx < 0 or tx >= w or ty < 0 or ty >= h: continue\n", + " if tx < 0 or tx >= mdecos.shape[1] or ty < 0 or ty >= mdecos.shape[0]: continue\n", " if mdecos[ty,tx] == 0: mdecos[ty,tx] = waste\n", - "# Draw bicycle parkings\n", - "bicycle = np.array([tvals[39],tvals[40]], dtype=np.int16)\n", - "for p in bicycles.get(\"geometry\", []):\n", - " if isinstance(p,Polygon): p = p.centroid\n", - " tx,ty = project(p.x,p.y,-.5,0)\n", - " if tx < 0 or tx+1 >= w or ty < 0 or ty+1 >= h: continue\n", - " if mdecos[ty,tx:tx+2].sum() == 0: mdecos[ty,tx:tx+2] = bicycle\n", + "# Draw ATMs\n", + "atm = tvals[3,8]\n", + "for p in atms.get(\"geometry\", []):\n", + " tx,ty = project(p.x,p.y)\n", + " if tx < 0 or tx >= mdecos.shape[1] or ty < 0 or ty >= mdecos.shape[0]: continue\n", + " if mdecos[ty,tx] == 0: mdecos[ty,tx] = atm\n", + "# Draw post box\n", + "postbox = tvals[4,7]\n", + "for p in postboxes.get(\"geometry\", []):\n", + " tx,ty = project(p.x,p.y)\n", + " if tx < 0 or tx >= mdecos.shape[1] or ty < 0 or ty >= mdecos.shape[0]: continue\n", + " if mdecos[ty,tx] == 0: mdecos[ty,tx] = postbox\n", "# Draw bollards\n", - "bollard = tvals[41]\n", + "bollard = tvals[5,7]\n", "for p in bollards.get(\"geometry\", []):\n", " if not isinstance(p, Point): continue\n", " tx,ty = project(p.x,p.y)\n", - " if tx < 0 or tx >= w or ty < 0 or ty >= h: continue\n", - " if mdecos[ty,tx] == 0: mdecos[ty,tx] = bollard\n" + " if tx < 0 or tx >= mdecos.shape[1] or ty < 0 or ty >= mdecos.shape[0]: continue\n", + " if mdecos[ty,tx] == 0: mdecos[ty,tx] = bollard\n", + "# Draw lift gates\n", + "gate = tvals[6,9] # TODO: width\n", + "for p in barriers.get(\"geometry\", []):\n", + " if not isinstance(p, Point): continue\n", + " tx,ty = project(p.x,p.y)\n", + " if tx < 0 or tx >= mdecos.shape[1] or ty < 0 or ty >= mdecos.shape[0]: continue\n", + " if mdecos[ty,tx] == 0: mdecos[ty,tx] = gate" ] }, { @@ -709,23 +724,25 @@ "metadata": {}, "outputs": [], "source": [ - "blayer = { \"data\":list(map(int,mdowns.reshape(-1))), \"height\":mdowns.shape[0], \"width\":mdowns.shape[1],\n", - " \"id\":1, \"name\":\"OSM-Base\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0}\n", - "ulayer = { \"data\":list(map(int,mupper.reshape(-1))), \"height\":mupper.shape[0], \"width\":mupper.shape[1],\n", - " \"id\":1, \"name\":\"OSM-Upper\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0}\n", - "player = { \"data\":list(map(int,np.zeros(mupper.shape).reshape(-1))), \"height\":mdecos.shape[0], \"width\":mdecos.shape[1],\n", - " \"id\":1, \"name\":\"OSM-Path\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0}\n", - "slayer = { \"data\":list(map(int,np.zeros(mupper.shape).reshape(-1))), \"height\":mdecos.shape[0], \"width\":mdecos.shape[1],\n", - " \"id\":1, \"name\":\"OSM-Street\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0}\n", - "dlayer = { \"data\":list(map(int,mdecos.reshape(-1))), \"height\":mdecos.shape[0], \"width\":mdecos.shape[1],\n", - " \"id\":1, \"name\":\"OSM-Deco\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0}\n", - "wolaye = { \"data\":list(map(int,np.zeros(mupper.shape).reshape(-1))), \"height\":mdecos.shape[0], \"width\":mdecos.shape[1],\n", - " \"id\":1, \"name\":\"OSM-WoodDeco\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0}\n", - "wlayer = { \"data\":list(map(int,mwalls.reshape(-1))), \"height\":mwalls.shape[0], \"width\":mwalls.shape[1],\n", - " \"id\":1, \"name\":\"OSM-Wall\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0}\n", - "wdlaye = { \"data\":list(map(int,mwdeco.reshape(-1))), \"height\":mwdeco.shape[0], \"width\":mwdeco.shape[1],\n", - " \"id\":1, \"name\":\"OSM-WallDeco\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0}\n", - "templ[\"layers\"] = [blayer, ulayer, player, slayer, dlayer, wolaye, wlayer, wdlaye]\n", + "templ[\"layers\"] = [\n", + " { \"data\":list(map(int,mdowns.reshape(-1))), \"height\":mdowns.shape[0], \"width\":mdowns.shape[1],\n", + " \"id\":1, \"name\":\"OSM-Base\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0},\n", + " { \"data\":list(map(int,mupper.reshape(-1))), \"height\":mupper.shape[0], \"width\":mupper.shape[1],\n", + " \"id\":2, \"name\":\"OSM-Upper\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0},\n", + " { \"data\":list(map(int,np.zeros(mupper.shape).reshape(-1))), \"height\":mdecos.shape[0], \"width\":mdecos.shape[1],\n", + " \"id\":3, \"name\":\"OSM-Path\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0},\n", + " { \"data\":list(map(int,np.zeros(mupper.shape).reshape(-1))), \"height\":mdecos.shape[0], \"width\":mdecos.shape[1],\n", + " \"id\":4, \"name\":\"OSM-Street\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0},\n", + " { \"data\":list(map(int,mdecos.reshape(-1))), \"height\":mdecos.shape[0], \"width\":mdecos.shape[1],\n", + " \"id\":5, \"name\":\"OSM-Deco\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0},\n", + " { \"id\":6, \"name\":\"floorLayer\", \"type\":\"objectgroup\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0, \"objects\":[]},\n", + " { \"data\":list(map(int,np.zeros(mupper.shape).reshape(-1))), \"height\":mdecos.shape[0], \"width\":mdecos.shape[1],\n", + " \"id\":7, \"name\":\"OSM-Wood\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0},\n", + " { \"data\":list(map(int,mwalls.reshape(-1))), \"height\":mwalls.shape[0], \"width\":mwalls.shape[1],\n", + " \"id\":8, \"name\":\"OSM-Wall\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0},\n", + " { \"data\":list(map(int,mwdeco.reshape(-1))), \"height\":mwdeco.shape[0], \"width\":mwdeco.shape[1],\n", + " \"id\":9, \"name\":\"OSM-WallDeco\", \"type\":\"tilelayer\", \"visible\":True, \"opacity\": 1.0, \"x\":0, \"y\":0},\n", + "]\n", "templ[\"width\"] = mdowns.shape[1]\n", "templ[\"height\"] = mdowns.shape[0]\n", "with open(\"generated/map.json\", \"wt\") as of:\n", @@ -759,7 +776,7 @@ { "cell_type": "code", "execution_count": null, - "id": "therapeutic-darwin", + "id": "young-track", "metadata": {}, "outputs": [], "source": [] @@ -767,7 +784,7 @@ { "cell_type": "code", "execution_count": null, - "id": "assisted-entry", + "id": "occasional-voice", "metadata": {}, "outputs": [], "source": [] diff --git a/generated/automapgrasses.tmx b/generated/automapgrasses.tmx index 4470fef8cf6cb3e48bf19050a1239fa3af87c3d3..a058eef37acf05f45964b221a0fa67e815801584 100644 --- a/generated/automapgrasses.tmx +++ b/generated/automapgrasses.tmx @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="35" height="8" tilewidth="32" tileheight="32" infinite="0" nextlayerid="19" nextobjectid="1"> +<map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="35" height="26" tilewidth="32" tileheight="32" infinite="0" nextlayerid="19" nextobjectid="1"> <tileset firstgid="1" name="Terrain" tilewidth="32" tileheight="32" tilecount="1024" columns="32"> <image source="lpc_terrain.png" width="1024" height="1024"/> </tileset> @@ -110,31 +110,67 @@ </animation> </tile> </tileset> - <layer id="1" name="regions" width="35" height="8"> + <layer id="1" name="regions" width="35" height="26"> <data encoding="csv"> 113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113, 113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +113,113,0,0,113,0,113,0,0,113,113,0,113,113,0,0,113,0,113,0,0,113,113,0,113,113,0,0,113,0,113,0,0,113,113, +0,113,0,113,113,0,113,113,0,113,0,0,0,113,0,113,113,0,113,113,0,113,0,0,0,113,0,113,113,0,113,113,0,113,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +113,0,113,0,113,113,0,113,113,0,0,0,113,0,113,0,113,113,0,113,113,0,0,0,113,0,113,0,113,113,0,113,113,0,0, +113,0,113,0,0,0,0,0,0,0,0,0,113,0,113,0,0,0,0,0,0,0,0,0,113,0,113,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,0,0,0,0,0,0,0,0,0,0,0, +113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +113,113,0,0,113,0,113,0,0,113,113,0,113,113,0,0,113,0,113,0,0,113,113,0,0,0,0,0,0,0,0,0,0,0,0, +0,113,0,113,113,0,113,113,0,113,0,0,0,113,0,113,113,0,113,113,0,113,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +113,0,113,0,113,113,0,113,113,0,0,0,113,0,113,0,113,113,0,113,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +113,0,113,0,0,0,0,0,0,0,0,0,113,0,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113, 113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113,0,113,113, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +113,113,0,0,113,0,113,0,0,113,113,0,113,113,0,0,113,0,113,0,0,113,113,0,113,113,0,0,113,0,113,0,0,113,113, +0,113,0,113,113,0,113,113,0,113,0,0,0,113,0,113,113,0,113,113,0,113,0,0,0,113,0,113,113,0,113,113,0,113,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 113,0,113,0,113,113,0,113,113,0,0,0,113,0,113,0,113,113,0,113,113,0,0,0,113,0,113,0,113,113,0,113,113,0,0, 113,0,113,0,0,0,0,0,0,0,0,0,113,0,113,0,0,0,0,0,0,0,0,0,113,0,113,0,0,0,0,0,0,0,0 </data> </layer> - <layer id="2" name="input_OSM-Base" width="35" height="8" tintcolor="#99c1f1"> + <layer id="2" name="input_OSM-Base" width="35" height="26" tintcolor="#99c1f1"> <data encoding="csv"> -302,1026,0,302,302,0,302,302,0,1026,302,0,302,354,0,302,302,0,302,302,0,354,302,0,354,1026,0,354,354,0,354,354,0,1026,354, -302,302,0,302,1026,0,1026,302,0,302,302,0,302,302,0,302,354,0,354,302,0,302,302,0,354,354,0,354,1026,0,1026,354,0,354,354, +302,1026,0,302,302,0,302,302,0,1026,302,0,302,354,0,302,302,0,302,302,0,354,302,0,302,299,0,302,302,0,302,302,0,299,302, +302,302,0,302,1026,0,1026,302,0,302,302,0,302,302,0,302,354,0,354,302,0,302,302,0,302,302,0,302,299,0,299,302,0,302,302, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +1026,302,0,0,1026,0,1026,0,0,302,1026,0,354,302,0,0,354,0,354,0,0,302,354,0,299,302,0,0,299,0,299,0,0,302,299, +0,1026,0,1026,302,0,302,1026,0,1026,0,0,0,354,0,354,302,0,302,354,0,354,0,0,0,299,0,299,302,0,302,299,0,299,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +302,0,1026,0,302,1026,0,1026,302,0,0,0,302,0,354,0,302,354,0,354,302,0,0,0,302,0,299,0,302,299,0,299,302,0,0, +1026,0,302,0,0,0,0,0,0,0,0,0,354,0,302,0,0,0,0,0,0,0,0,0,299,0,302,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +354,1026,0,354,354,0,354,354,0,1026,354,0,354,1028,0,354,354,0,354,354,0,1028,354,0,0,0,0,0,0,0,0,0,0,0,0, +354,354,0,354,1026,0,1026,354,0,354,354,0,354,354,0,354,1028,0,1028,354,0,354,354,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +1026,354,0,0,1026,0,1026,0,0,354,1026,0,1028,354,0,0,1028,0,1028,0,0,354,1028,0,0,0,0,0,0,0,0,0,0,0,0, +0,1026,0,1026,354,0,354,1026,0,1026,0,0,0,1028,0,1028,354,0,354,1028,0,1028,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -1026,302,0,1026,1026,0,1026,1026,0,302,1026,0,354,302,0,354,354,0,354,354,0,302,354,0,1026,354,0,1026,1026,0,1026,1026,0,354,1026, -1026,1026,0,1026,302,0,302,1026,0,1026,1026,0,354,354,0,354,302,0,302,354,0,354,354,0,1026,1026,0,1026,354,0,354,1026,0,1026,1026, +354,0,1026,0,354,1026,0,1026,354,0,0,0,354,0,1028,0,354,1028,0,1028,354,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +1026,0,354,0,0,0,0,0,0,0,0,0,1028,0,354,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -302,0,1026,0,302,1026,0,1026,302,0,0,0,302,0,354,0,302,354,0,354,302,0,0,0,354,0,1026,0,354,1026,0,1026,354,0,0, -1026,0,302,0,0,0,0,0,0,0,0,0,354,0,302,0,0,0,0,0,0,0,0,0,1026,0,354,0,0,0,0,0,0,0,0 +299,354,0,299,299,0,299,299,0,354,299,0,299,1026,0,299,299,0,299,299,0,1026,299,0,299,1028,0,299,299,0,299,299,0,1028,299, +299,299,0,299,354,0,354,299,0,299,299,0,299,299,0,299,1026,0,1026,299,0,299,299,0,299,299,0,299,1028,0,1028,299,0,299,299, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +354,299,0,0,354,0,354,0,0,299,354,0,1026,299,0,0,1026,0,1026,0,0,299,1026,0,1028,299,0,0,1028,0,1028,0,0,299,1028, +0,354,0,354,299,0,299,354,0,354,0,0,0,1026,0,1026,299,0,299,1026,0,1026,0,0,0,1028,0,1028,299,0,299,1028,0,1028,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +299,0,354,0,299,354,0,354,299,0,0,0,299,0,1026,0,299,1026,0,1026,299,0,0,0,299,0,1028,0,299,1028,0,1028,299,0,0, +354,0,299,0,0,0,0,0,0,0,0,0,1026,0,299,0,0,0,0,0,0,0,0,0,1028,0,299,0,0,0,0,0,0,0,0 </data> </layer> - <layer id="5" name="input_OSM-Upper" width="35" height="8"> + <layer id="5" name="input_OSM-Upper" width="35" height="26"> <properties> <property name="StrictEmpty" type="bool" value="true"/> </properties> @@ -146,31 +182,85 @@ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 </data> </layer> - <layer id="3" name="output_OSM-Base" width="35" height="8"> + <layer id="3" name="output_OSM-Base" width="35" height="26"> <data encoding="csv"> -0,0,0,1026,0,0,0,0,0,0,0,0,0,0,0,1025,0,0,0,0,0,0,0,0,0,0,0,1026,0,0,0,0,0,0,0, -1026,0,0,0,0,0,0,0,0,0,1026,0,1025,0,0,0,0,0,0,0,0,0,1025,0,1026,0,0,0,0,0,0,0,0,0,1026, +0,0,0,1026,0,0,0,1026,0,0,0,0,0,0,0,1025,0,0,0,1025,0,0,0,0,0,0,0,299,0,0,0,299,0,0,0, +1026,0,0,0,0,0,0,0,0,0,1026,0,1025,0,0,0,0,0,0,0,0,0,1025,0,299,0,0,0,0,0,0,0,0,0,299, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,1026,0,0,0,0,0,0,0,1026,0,0,0,354,0,0,0,0,0,0,0,354,0,0,0,299,0,0,0,0,0,0,0,299,0, +0,0,0,0,1026,0,1026,0,0,0,0,0,0,0,0,0,354,0,354,0,0,0,0,0,0,0,0,0,299,0,299,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +1026,0,0,0,1026,0,0,0,1026,0,0,0,354,0,0,0,354,0,0,0,354,0,0,0,299,0,0,0,299,0,0,0,299,0,0, +0,0,1026,0,0,0,0,0,0,0,0,0,0,0,354,0,0,0,0,0,0,0,0,0,0,0,299,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,1026,0,0,0,0,0,0,0,1026,0,0,0,354,0,0,0,0,0,0,0,354,0,0,0,1026,0,0,0,0,0,0,0,1026,0, -0,0,0,0,1026,0,1026,0,0,0,0,0,0,0,0,0,354,0,354,0,0,0,0,0,0,0,0,0,1026,0,1026,0,0,0,0, +0,0,0,1026,0,0,0,1026,0,0,0,0,0,0,0,1028,0,0,0,1028,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +1026,0,0,0,0,0,0,0,0,0,1026,0,1028,0,0,0,0,0,0,0,0,0,1028,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -1026,0,0,0,1026,0,0,0,1026,0,0,0,354,0,0,0,354,0,0,0,354,0,0,0,1026,0,0,0,1026,0,0,0,1026,0,0, -0,0,1026,0,0,0,0,0,0,0,0,0,0,0,354,0,0,0,0,0,0,0,0,0,0,0,1026,0,0,0,0,0,0,0,0 +0,1026,0,0,0,0,0,0,0,1026,0,0,0,1028,0,0,0,0,0,0,0,1028,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,1026,0,1026,0,0,0,0,0,0,0,0,0,1028,0,1028,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +1026,0,0,0,1026,0,0,0,1026,0,0,0,1028,0,0,0,1028,0,0,0,1028,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1026,0,0,0,0,0,0,0,0,0,0,0,1028,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,354,0,0,0,354,0,0,0,0,0,0,0,1026,0,0,0,1026,0,0,0,0,0,0,0,1028,0,0,0,1028,0,0,0, +354,0,0,0,0,0,0,0,0,0,354,0,1026,0,0,0,0,0,0,0,0,0,1026,0,1028,0,0,0,0,0,0,0,0,0,1028, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,354,0,0,0,0,0,0,0,354,0,0,0,1026,0,0,0,0,0,0,0,1026,0,0,0,1028,0,0,0,0,0,0,0,1028,0, +0,0,0,0,354,0,354,0,0,0,0,0,0,0,0,0,1026,0,1026,0,0,0,0,0,0,0,0,0,1028,0,1028,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +354,0,0,0,354,0,0,0,354,0,0,0,1026,0,0,0,1026,0,0,0,1026,0,0,0,1028,0,0,0,1028,0,0,0,1028,0,0, +0,0,354,0,0,0,0,0,0,0,0,0,0,0,1026,0,0,0,0,0,0,0,0,0,0,0,1028,0,0,0,0,0,0,0,0 </data> </layer> - <layer id="4" name="output_OSM-Upper" width="35" height="8"> + <layer id="4" name="output_OSM-Upper" width="35" height="26"> <data encoding="csv"> -0,0,0,206,0,0,0,207,0,0,0,0,0,0,0,206,0,0,0,207,0,0,0,0,0,0,0,194,0,0,0,195,0,0,0, -238,0,0,0,0,0,0,0,0,0,239,0,238,0,0,0,0,0,0,0,0,0,239,0,226,0,0,0,0,0,0,0,0,0,227, +0,0,0,206,0,0,0,207,0,0,0,0,0,0,0,206,0,0,0,207,0,0,0,0,0,0,0,206,0,0,0,207,0,0,0, +238,0,0,0,0,0,0,0,0,0,239,0,238,0,0,0,0,0,0,0,0,0,239,0,238,0,0,0,0,0,0,0,0,0,239, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,333,0,0,0,0,0,0,0,335,0,0,0,333,0,0,0,0,0,0,0,335,0,0,0,333,0,0,0,0,0,0,0,335,0, +0,0,0,0,269,0,271,0,0,0,0,0,0,0,0,0,269,0,271,0,0,0,0,0,0,0,0,0,269,0,271,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +334,0,0,0,303,0,0,0,301,0,0,0,334,0,0,0,303,0,0,0,301,0,0,0,334,0,0,0,303,0,0,0,301,0,0, +0,0,270,0,0,0,0,0,0,0,0,0,0,0,270,0,0,0,0,0,0,0,0,0,0,0,270,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,194,0,0,0,195,0,0,0,0,0,0,0,194,0,0,0,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +226,0,0,0,0,0,0,0,0,0,227,0,226,0,0,0,0,0,0,0,0,0,227,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,321,0,0,0,0,0,0,0,323,0,0,0,321,0,0,0,0,0,0,0,323,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,257,0,259,0,0,0,0,0,0,0,0,0,257,0,259,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +322,0,0,0,291,0,0,0,289,0,0,0,322,0,0,0,291,0,0,0,289,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,258,0,0,0,0,0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,203,0,0,0,204,0,0,0,0,0,0,0,203,0,0,0,204,0,0,0,0,0,0,0,203,0,0,0,204,0,0,0, +235,0,0,0,0,0,0,0,0,0,236,0,235,0,0,0,0,0,0,0,0,0,236,0,235,0,0,0,0,0,0,0,0,0,236, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,333,0,0,0,0,0,0,0,335,0,0,0,333,0,0,0,0,0,0,0,335,0,0,0,321,0,0,0,0,0,0,0,323,0, -0,0,0,0,269,0,271,0,0,0,0,0,0,0,0,0,269,0,271,0,0,0,0,0,0,0,0,0,257,0,259,0,0,0,0, +0,330,0,0,0,0,0,0,0,332,0,0,0,330,0,0,0,0,0,0,0,332,0,0,0,330,0,0,0,0,0,0,0,332,0, +0,0,0,0,266,0,268,0,0,0,0,0,0,0,0,0,266,0,268,0,0,0,0,0,0,0,0,0,266,0,268,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -334,0,0,0,303,0,0,0,301,0,0,0,334,0,0,0,303,0,0,0,301,0,0,0,322,0,0,0,291,0,0,0,289,0,0, -0,0,270,0,0,0,0,0,0,0,0,0,0,0,270,0,0,0,0,0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0 +331,0,0,0,300,0,0,0,298,0,0,0,331,0,0,0,300,0,0,0,298,0,0,0,331,0,0,0,300,0,0,0,298,0,0, +0,0,267,0,0,0,0,0,0,0,0,0,0,0,267,0,0,0,0,0,0,0,0,0,0,0,267,0,0,0,0,0,0,0,0 </data> </layer> </map> diff --git a/generated/automaptracks.tmx b/generated/automaptracks.tmx index c6bfaac91f275b3d0b3f5f1356112be99f427e2c..d3d3859b026823f84f714636d641108875aba97e 100644 --- a/generated/automaptracks.tmx +++ b/generated/automaptracks.tmx @@ -37,13 +37,13 @@ 0,1241,1241,0,1241,1241,0,1241,1241,0,1241,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1241,1241,0,1241,1241,0,1241,1241,0,1241,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,1241,1241,1241,0,0,1241,0,0,0,1241,0,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,1241,0,0,1241,1241,1241,0,1241,1241,0,1241,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,1241,0,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1241,0,0,0,1241,0,0,0,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,1241,1241,1241,0,1241,1241,1241,0,1241,1241,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1241,0,0,0,1241,0,0,0,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1241,0,0,0,1241,0,0,0,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,1241,1241,1241,0,1241,1241,1241,0,1241,1241,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1241,0,0,0,1241,0,0,0,1241,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 </data> @@ -56,10 +56,10 @@ 0,1235,1235,1235,0,0,1235,0,0,0,0,0,0,0,1235,0,0,1235,0,0,0,0,0,0,0,1235,0,0,0,0,0,0, 0,0,0,0,0,0,0,1235,1235,1235,0,1235,1235,1235,0,0,0,0,1235,1235,1235,0,1235,1235,1235,0,0,0,0,0,0,0, 0,1235,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,1235,0,1235,0,0,0,1235,0,0,0,0,0,0,0,1235,0,0,0,0,0,0,1235,0,0,0,0,0,0,0,0,0, +0,1235,0,1235,0,0,0,1235,0,0,0,0,0,0,0,1235,0,0,0,0,0,0,1235,1235,0,0,0,0,0,0,0,0, 0,1235,0,1235,0,1235,0,0,1235,1235,0,0,0,1235,1235,0,0,1235,0,0,0,1235,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1235,1235,0,0,1235,0,1235,0,0,1235,1235,0,0,0,0,0,0,1235,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,1235,0,0,0,0,0,1235,0,0,0,0,0,0,0,1235,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,1235,0,0,0,0,0,1235,0,0,0,0,0,0,1235,1235,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,1235,1235,1235,0,0,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -73,13 +73,13 @@ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,1235,0,1235,0,0,0,0,0,0,1235,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,1235,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,1235,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,1235,0,1235,0,1235,0,1235,0,1235,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1235,0,0,0,1235,0,0,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,1235,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1235,0,0,0,1235,0,0,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 </data> @@ -109,12 +109,12 @@ 0,1238,1238,0,1238,1238,0,1235,1238,0,1238,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1235,1238,0,1238,1235,0,1238,1238,0,1238,1238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,1238,0,0,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,1235,0,0,0,1238,0,0,1235,1238,0,1238,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1235,0,0,0,0,0,0,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1238,0,0,0,1238,0,0,0,1238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1235,0,0,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,1235,1238,1235,0,1235,1238,0,0,0,1238,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 @@ -146,11 +146,11 @@ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1298,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1298,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 @@ -160,7 +160,7 @@ <data encoding="csv"> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,1065,0,0,0,2336,2282,0,0,0,0,0,2283,2333,0,0,1065,2336,2282,0,0,0,2283,2333,1065,0,0,0,0,0,0, +0,0,1065,0,0,0,2336,2282,0,0,0,0,0,2283,2333,0,0,0,2336,2282,0,0,0,2283,2333,0,0,0,0,0,0,0, 0,0,0,0,0,0,2352,2319,2320,0,0,0,2317,2318,2349,0,0,0,2352,2319,2320,0,2317,2318,2349,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -181,12 +181,12 @@ 0,0,1204,0,1202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,1268,0,1266,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,1203,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,1267,0,0,0,1236,0,1234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1267,0,0,0,1203,0,0,0,1267,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1234,0,0,0,1236,0,0,0,1234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/generated/automapwindows1.tmx b/generated/automapwindows1.tmx index 3453566a4ac024ee40f73632fb13ac58d245a1c7..cebc076ee4dd1cf0e7b0de0b289e3d3fc3008966 100644 --- a/generated/automapwindows1.tmx +++ b/generated/automapwindows1.tmx @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="5" height="1" tilewidth="32" tileheight="32" infinite="0" nextlayerid="26" nextobjectid="1"> +<map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="5" height="1" tilewidth="32" tileheight="32" infinite="0" nextlayerid="32" nextobjectid="1"> <tileset firstgid="1" name="Terrain" tilewidth="32" tileheight="32" tilecount="1024" columns="32"> <image source="lpc_terrain.png" width="1024" height="1024"/> </tileset> diff --git a/generated/automapwindows1b.tmx b/generated/automapwindows1b.tmx new file mode 100644 index 0000000000000000000000000000000000000000..0ace51b1bc3e8461bc1817ba94ec4ab054bece2f --- /dev/null +++ b/generated/automapwindows1b.tmx @@ -0,0 +1,152 @@ +<?xml version="1.0" encoding="UTF-8"?> +<map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="5" height="2" tilewidth="32" tileheight="32" infinite="0" nextlayerid="33" nextobjectid="1"> + <tileset firstgid="1" name="Terrain" tilewidth="32" tileheight="32" tilecount="1024" columns="32"> + <image source="lpc_terrain.png" width="1024" height="1024"/> + </tileset> + <tileset firstgid="1025" name="fantasy" tilewidth="32" tileheight="32" tilecount="1064" columns="8"> + <image source="fantasy.png" width="256" height="4256"/> + </tileset> + <tileset firstgid="2089" name="water" tilewidth="32" tileheight="32" tilecount="3072" columns="64"> + <image source="water.png" width="2048" height="1536"/> + </tileset> + <tileset firstgid="5161" name="outside" tilewidth="32" tileheight="32" tilecount="432" columns="24"> + <image source="lpc-city-outside.png" width="768" height="576"/> + <tile id="320"> + <animation> + <frame tileid="320" duration="333"/> + <frame tileid="324" duration="333"/> + <frame tileid="328" duration="333"/> + </animation> + </tile> + <tile id="321"> + <animation> + <frame tileid="321" duration="333"/> + <frame tileid="325" duration="333"/> + <frame tileid="329" duration="333"/> + </animation> + </tile> + <tile id="322"> + <animation> + <frame tileid="322" duration="333"/> + <frame tileid="326" duration="333"/> + <frame tileid="330" duration="333"/> + </animation> + </tile> + <tile id="323"> + <animation> + <frame tileid="323" duration="333"/> + <frame tileid="327" duration="333"/> + <frame tileid="331" duration="333"/> + </animation> + </tile> + <tile id="344"> + <animation> + <frame tileid="344" duration="333"/> + <frame tileid="348" duration="333"/> + <frame tileid="352" duration="333"/> + </animation> + </tile> + <tile id="345"> + <animation> + <frame tileid="345" duration="333"/> + <frame tileid="349" duration="333"/> + <frame tileid="353" duration="333"/> + </animation> + </tile> + <tile id="346"> + <animation> + <frame tileid="346" duration="333"/> + <frame tileid="350" duration="333"/> + <frame tileid="354" duration="333"/> + </animation> + </tile> + <tile id="347"> + <animation> + <frame tileid="347" duration="333"/> + <frame tileid="351" duration="333"/> + <frame tileid="355" duration="333"/> + </animation> + </tile> + <tile id="368"> + <animation> + <frame tileid="368" duration="333"/> + <frame tileid="372" duration="333"/> + <frame tileid="376" duration="333"/> + </animation> + </tile> + <tile id="369"> + <animation> + <frame tileid="369" duration="333"/> + <frame tileid="373" duration="333"/> + <frame tileid="377" duration="333"/> + </animation> + </tile> + <tile id="370"> + <animation> + <frame tileid="370" duration="333"/> + <frame tileid="374" duration="333"/> + <frame tileid="378" duration="333"/> + </animation> + </tile> + <tile id="371"> + <animation> + <frame tileid="371" duration="333"/> + <frame tileid="375" duration="333"/> + <frame tileid="379" duration="333"/> + </animation> + </tile> + <tile id="392"> + <animation> + <frame tileid="392" duration="333"/> + <frame tileid="396" duration="333"/> + <frame tileid="400" duration="333"/> + </animation> + </tile> + <tile id="416"> + <animation> + <frame tileid="416" duration="333"/> + <frame tileid="420" duration="333"/> + <frame tileid="424" duration="333"/> + </animation> + </tile> + </tileset> + <layer id="1" name="regions" width="5" height="2" tintcolor="#e01b24"> + <data encoding="csv"> +5267,0,5267,0,5267, +5267,0,5267,0,5267 +</data> + </layer> + <layer id="30" name="input_OSM-Base" width="5" height="2" tintcolor="#99c1f1"> + <data encoding="csv"> +5264,0,5263,0,5265, +0,0,0,0,0 +</data> + </layer> + <layer id="31" name="inputnot_OSM-Base" width="5" height="2" tintcolor="#ed333b"> + <data encoding="csv"> +0,0,0,0,0, +5263,0,5264,0,5265 +</data> + </layer> + <layer id="32" name="inputnot_OSM-Base" width="5" height="2" tintcolor="#f66151"> + <data encoding="csv"> +0,0,0,0,0, +621,0,621,0,621 +</data> + </layer> + <layer id="29" name="input_OSM-Upper" width="5" height="2" tintcolor="#99c1f1"> + <properties> + <property name="StrictEmpty" type="bool" value="true"/> + </properties> + <data encoding="csv"> +0,0,0,0,0, +0,0,0,0,0 +</data> + </layer> + <layer id="28" name="output_OSM-Upper" width="5" height="2"> + <data encoding="csv"> +1633,0,1633,0,1633, +0,0,0,0,0 +</data> + </layer> +</map> diff --git a/generated/automapwood.tmx b/generated/automapwood.tmx index df997aca31ae54376e1f633fb2958ec1039d010c..67dda87938c8c47c64c1f68fd06bf31caf6084db 100644 --- a/generated/automapwood.tmx +++ b/generated/automapwood.tmx @@ -389,6 +389,9 @@ </data> </layer> <layer id="18" name="input_OSM-Wood" width="64" height="64"> + <properties> + <property name="StrictEmpty" type="bool" value="true"/> + </properties> <data encoding="csv"> 1059,1060,1059,1060,0,0,1043,0,1044,1043,0,1044,0,0,0,0,0,0,1043,0,1044,1043,0,1044,0,0,0,0,0,0,1043,0,1044,1043,0,1044,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1060,1059,1060,1059,0,0,1035,0,0,0,0,1036,0,0,1036,1035,0,0,1035,0,0,0,0,1036,0,0,1036,1035,0,0,1035,0,0,0,0,1036,0,0,1036,1035,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, diff --git a/generated/rules.txt b/generated/rules.txt index 71cb5ccbe98de1ca2d4760dda7135eaa82f0dc53..3eda7fa333b06771d86ec980875498d18198ac83 100644 --- a/generated/rules.txt +++ b/generated/rules.txt @@ -2,7 +2,8 @@ automapwater.tmx automapstrt.tmx automappaths.tmx automapwood.tmx -automapwall2.tmx -automapwindows2.tmx +automapwall1.tmx +automapwindows1.tmx +automapwindows1b.tmx automapgrasses.tmx automaptracks.tmx diff --git a/generated/template1.json b/generated/template1.json index 4ca5b55b3a41c83215b29b83431d22b002d82f50..d289dbdd1ced438f19323d7e794b9f436925709a 100644 --- a/generated/template1.json +++ b/generated/template1.json @@ -12,18 +12,18 @@ "target":"map.json" } }, - "height":3, + "height":8, "infinite":false, "layers":[ { - "data":[2, 1418, 1366, 4, 1363, 1162, 7, 8, 291, 2210, 0, 2435, 11, 12, 0, 0, 1171, 47, 48, 230, 0, 42, 1174, 1685, 1230, 2192, 2227, 1506, 19, 20, 2351, 2204, 236, 725, 709, 238, 0, 866, 237, 189, 181, 208, 0, 0, 0, 0, 2398, 2228], - "height":3, + "data":[2, 1418, 1366, 4, 1363, 1162, 7, 8, 291, 2210, 1171, 1506, 2435, 1189, 1421, 1458, 1174, 1685, 1230, 2192, 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 42, 0, 0, 662, 660, 661, 863, 866, 19, 20, 0, 0, 0, 0, 237, 229, 725, 709, 929, 930, 931, 0, 0, 0, 236, 208, 47, 48, 937, 938, 939, 2351, 909, 0, 230, 1260, 546, 546, 945, 946, 947, 2398, 917, 2227, 238, 1292, 189, 181], + "height":8, "id":1, "name":"Template", "opacity":1, "type":"tilelayer", "visible":true, - "width":16, + "width":10, "x":0, "y":0 }], @@ -3595,15 +3595,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":320 }, { - "duration":333, + "duration":300, "tileid":324 }, { - "duration":333, + "duration":300, "tileid":328 }], "id":320 @@ -3611,15 +3611,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":321 }, { - "duration":333, + "duration":300, "tileid":325 }, { - "duration":333, + "duration":300, "tileid":329 }], "id":321 @@ -3627,15 +3627,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":322 }, { - "duration":333, + "duration":300, "tileid":326 }, { - "duration":333, + "duration":300, "tileid":330 }], "id":322 @@ -3643,15 +3643,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":323 }, { - "duration":333, + "duration":300, "tileid":327 }, { - "duration":333, + "duration":300, "tileid":331 }], "id":323 @@ -3659,15 +3659,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":344 }, { - "duration":333, + "duration":300, "tileid":348 }, { - "duration":333, + "duration":300, "tileid":352 }], "id":344 @@ -3675,15 +3675,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":345 }, { - "duration":333, + "duration":300, "tileid":349 }, { - "duration":333, + "duration":300, "tileid":353 }], "id":345 @@ -3691,15 +3691,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":346 }, { - "duration":333, + "duration":300, "tileid":350 }, { - "duration":333, + "duration":300, "tileid":354 }], "id":346 @@ -3707,15 +3707,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":347 }, { - "duration":333, + "duration":300, "tileid":351 }, { - "duration":333, + "duration":300, "tileid":355 }], "id":347 @@ -3723,15 +3723,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":368 }, { - "duration":333, + "duration":300, "tileid":372 }, { - "duration":333, + "duration":300, "tileid":376 }], "id":368 @@ -3739,15 +3739,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":369 }, { - "duration":333, + "duration":300, "tileid":373 }, { - "duration":333, + "duration":300, "tileid":377 }], "id":369 @@ -3755,15 +3755,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":370 }, { - "duration":333, + "duration":300, "tileid":374 }, { - "duration":333, + "duration":300, "tileid":378 }], "id":370 @@ -3771,15 +3771,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":371 }, { - "duration":333, + "duration":300, "tileid":375 }, { - "duration":333, + "duration":300, "tileid":379 }], "id":371 @@ -3787,15 +3787,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":392 }, { - "duration":333, + "duration":300, "tileid":396 }, { - "duration":333, + "duration":300, "tileid":400 }], "id":392 @@ -3803,15 +3803,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":416 }, { - "duration":333, + "duration":300, "tileid":420 }, { - "duration":333, + "duration":300, "tileid":424 }], "id":416 @@ -3821,5 +3821,5 @@ "tilewidth":32, "type":"map", "version":1.4, - "width":16 + "width":10 } \ No newline at end of file diff --git a/generated/template2.json b/generated/template2.json index ea6d181c7f28ba10d61daf4f135b2ea7b8bc59de..15edd30c5ad6e759bcae2cd1392b1f9093dce8ba 100644 --- a/generated/template2.json +++ b/generated/template2.json @@ -12,18 +12,18 @@ "target":"map.json" } }, - "height":3, + "height":8, "infinite":false, "layers":[ { - "data":[2, 1418, 1366, 4, 1363, 1162, 7, 8, 291, 2210, 392, 2435, 11, 12, 2351, 906, 1171, 47, 48, 230, 0, 42, 1174, 1685, 1230, 2192, 400, 1506, 19, 20, 2374, 914, 236, 725, 709, 238, 0, 866, 237, 189, 181, 208, 0, 0, 0, 0, 2398, 922], - "height":3, + "data":[2, 1418, 1366, 4, 1363, 1162, 7, 8, 291, 2210, 1171, 1506, 2435, 1189, 1421, 1458, 1174, 1685, 1230, 2192, 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 42, 0, 0, 662, 660, 661, 863, 866, 19, 20, 0, 0, 0, 0, 237, 229, 725, 709, 929, 930, 931, 2351, 906, 0, 236, 208, 47, 48, 937, 938, 939, 2374, 914, 392, 230, 1260, 546, 546, 945, 946, 947, 2398, 922, 400, 238, 1292, 189, 181], + "height":8, "id":1, "name":"Template", "opacity":1, "type":"tilelayer", "visible":true, - "width":16, + "width":10, "x":0, "y":0 }], @@ -3595,15 +3595,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":320 }, { - "duration":333, + "duration":300, "tileid":324 }, { - "duration":333, + "duration":300, "tileid":328 }], "id":320 @@ -3611,15 +3611,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":321 }, { - "duration":333, + "duration":300, "tileid":325 }, { - "duration":333, + "duration":300, "tileid":329 }], "id":321 @@ -3627,15 +3627,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":322 }, { - "duration":333, + "duration":300, "tileid":326 }, { - "duration":333, + "duration":300, "tileid":330 }], "id":322 @@ -3643,15 +3643,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":323 }, { - "duration":333, + "duration":300, "tileid":327 }, { - "duration":333, + "duration":300, "tileid":331 }], "id":323 @@ -3659,15 +3659,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":344 }, { - "duration":333, + "duration":300, "tileid":348 }, { - "duration":333, + "duration":300, "tileid":352 }], "id":344 @@ -3675,15 +3675,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":345 }, { - "duration":333, + "duration":300, "tileid":349 }, { - "duration":333, + "duration":300, "tileid":353 }], "id":345 @@ -3691,15 +3691,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":346 }, { - "duration":333, + "duration":300, "tileid":350 }, { - "duration":333, + "duration":300, "tileid":354 }], "id":346 @@ -3707,15 +3707,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":347 }, { - "duration":333, + "duration":300, "tileid":351 }, { - "duration":333, + "duration":300, "tileid":355 }], "id":347 @@ -3723,15 +3723,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":368 }, { - "duration":333, + "duration":300, "tileid":372 }, { - "duration":333, + "duration":300, "tileid":376 }], "id":368 @@ -3739,15 +3739,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":369 }, { - "duration":333, + "duration":300, "tileid":373 }, { - "duration":333, + "duration":300, "tileid":377 }], "id":369 @@ -3755,15 +3755,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":370 }, { - "duration":333, + "duration":300, "tileid":374 }, { - "duration":333, + "duration":300, "tileid":378 }], "id":370 @@ -3771,15 +3771,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":371 }, { - "duration":333, + "duration":300, "tileid":375 }, { - "duration":333, + "duration":300, "tileid":379 }], "id":371 @@ -3787,15 +3787,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":392 }, { - "duration":333, + "duration":300, "tileid":396 }, { - "duration":333, + "duration":300, "tileid":400 }], "id":392 @@ -3803,15 +3803,15 @@ { "animation":[ { - "duration":333, + "duration":300, "tileid":416 }, { - "duration":333, + "duration":300, "tileid":420 }, { - "duration":333, + "duration":300, "tileid":424 }], "id":416 @@ -3821,5 +3821,5 @@ "tilewidth":32, "type":"map", "version":1.4, - "width":16 + "width":10 } \ No newline at end of file