diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1644a0a --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +use nix +layout python3 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..146f39d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.venv +.ipynb_checkpoints diff --git a/clean.sh b/clean.sh new file mode 100755 index 0000000..88b6d67 --- /dev/null +++ b/clean.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +rm -rf .direnv .venv diff --git a/jupyter-lab.sh b/jupyter-lab.sh new file mode 100755 index 0000000..c66dc90 --- /dev/null +++ b/jupyter-lab.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +echo "🪛 Running Jupyter using Venv:" +echo "Switch the kernel to 'virtualenv'" +echo "after opening in its own window" +echo "--------------------------------" +python -m ipykernel install --user --name=virtualenv +jupyter kernelspec list +jupyter-lab diff --git a/list-vscode-extensions.sh b/list-vscode-extensions.sh new file mode 100755 index 0000000..ad896c3 --- /dev/null +++ b/list-vscode-extensions.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +code --extensions-dir=".vscode-extensions" --list-extensions | xargs -L 1 echo code --extensions-dir=".vscode-extensions" --install-extension diff --git a/osm_LoD1_3DCityModel-walkthrough.ipynb b/osm_LoD1_3DCityModel-walkthrough.ipynb index 0a875e5..9816bcb 100644 --- a/osm_LoD1_3DCityModel-walkthrough.ipynb +++ b/osm_LoD1_3DCityModel-walkthrough.ipynb @@ -15,6 +15,180 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/home/timlinux/dev/python/geo3D\n", + "\n", + "/nix/store/fvnz0idj2f5gpi2m7i16mk9bqndxnc4x-python3.11-cffi-1.16.0/lib/python3.11/site-packages\n", + "/nix/store/df97sv2vla41lcsixamcskddkmnxnd9i-python3.11-pycparser-2.21/lib/python3.11/site-packages\n", + "/nix/store/yvhwsfbh4bc99vfvwpaa70m4yng4pvpz-python3-3.11.8/lib/python3.11/site-packages\n", + "/nix/store/6ajvkzc5l7daqjp0qkq86y7lak2jdr3c-python3.11-virtualenv-20.24.5/lib/python3.11/site-packages\n", + "/nix/store/jp6vhca7kmdvdgx3q41rjpl7x21y2xbg-python3.11-distlib-0.3.7/lib/python3.11/site-packages\n", + "/nix/store/vs3khn1ck5d65ynw0mgrxhagi8sxmxmg-python3.11-filelock-3.12.4/lib/python3.11/site-packages\n", + "/nix/store/0cbabwqcf8cz5xvrkwm4ipli4j28jhpq-python3.11-platformdirs-3.10.0/lib/python3.11/site-packages\n", + "/nix/store/wcq7srrxaj1470wzx3cmjj8dndldhz54-python3.11-numpy-1.26.1/lib/python3.11/site-packages\n", + "/nix/store/b7f4czcf11y7ppajxizdydp496davf0d-python3.11-pip-23.2.1/lib/python3.11/site-packages\n", + "/nix/store/mg226zrnakgn9dvm01mn9dmla6izfd37-python3.11-overpy-0.6/lib/python3.11/site-packages\n", + "/nix/store/hwyladwvj4sj6bilg0lm5hh150vf07di-python3.11-osmpythontools-0.3.5/lib/python3.11/site-packages\n", + "/nix/store/vkddq8f79rdv73adpgqlfw1ccgiyj8kz-python3.11-beautifulsoup4-4.12.2/lib/python3.11/site-packages\n", + "/nix/store/96kn6bvwvzrmmbqzhp1qvyxz3g6ljh1l-python3.11-chardet-5.2.0/lib/python3.11/site-packages\n", + "/nix/store/njmdbi8kfqprw0c62kamwqiv1abapikh-python3.11-soupsieve-2.5/lib/python3.11/site-packages\n", + "/nix/store/4q8bcmifbcx6gvrs99acgb4rwcixqhlp-python3.11-geojson-3.0.1/lib/python3.11/site-packages\n", + "/nix/store/zrf0fks39dpwmdvafz1gkyarg7g2nxmz-python3.11-lxml-4.9.3-3/lib/python3.11/site-packages\n", + "/nix/store/pk2vpjsrlsaw9hdvgzdyybpv2mshhnpi-python3.11-matplotlib-3.8.0/lib/python3.11/site-packages\n", + "/nix/store/3pvgqx463pa6wh2x05gpvlnvgr1zx732-python3.11-contourpy-1.1.0/lib/python3.11/site-packages\n", + "/nix/store/wip0mqxp1c3kg37mvpx58vzx0rcvd0g4-python3.11-cycler-0.11.0/lib/python3.11/site-packages\n", + "/nix/store/nl7nh20xd4b6nf3vsql9jhcapj34a8jq-python3.11-six-1.16.0/lib/python3.11/site-packages\n", + "/nix/store/0dq3qwhm8vcqp78lkgx2p8dflf66d41s-python3.11-fonttools-4.42.1/lib/python3.11/site-packages\n", + "/nix/store/3lkb1zmll0xb9ym4qxqwxlbq0ksg9d6p-python3.11-kiwisolver-1.4.5/lib/python3.11/site-packages\n", + "/nix/store/y0larh2y1fsv73rxi5irflagmxi6cri2-python3.11-packaging-23.1/lib/python3.11/site-packages\n", + "/nix/store/iacfv5rdmd8z9kfqfa6pfr9jwj7lm75c-python3.11-pillow-10.2.0/lib/python3.11/site-packages\n", + "/nix/store/w9vrj50l12zc3jlfa5b3gcq64f2kbwza-python3.11-olefile-0.46/lib/python3.11/site-packages\n", + "/nix/store/pzrnmah66shj1r3npg8q19f3fq9fs9pr-python3.11-defusedxml-0.7.1/lib/python3.11/site-packages\n", + "/nix/store/115l9a24v18w260psax421n6dsvvwvvx-python3.11-pyparsing-3.0.9/lib/python3.11/site-packages\n", + "/nix/store/7k2h9d857mmwrqx0gs4501ik622ww54k-python3.11-python-dateutil-2.8.2/lib/python3.11/site-packages\n", + "/nix/store/jhsnaky2gykc8kh5nsnnfrmc1l68pcff-python3.11-tkinter-3.11.8/lib/python3.11/site-packages\n", + "/nix/store/9bf1dwf7jgpxv16s55ni5qigqz40a8dv-python3.11-pandas-2.1.1/lib/python3.11/site-packages\n", + "/nix/store/6n1a0m2bbp715gi7p1ckf8qcwrvzvy2p-python3.11-pytz-2023.3.post1/lib/python3.11/site-packages\n", + "/nix/store/m67l9m2ln74a9qpraj9xz6rjj9gyq76g-python3.11-tzdata-2023.3/lib/python3.11/site-packages\n", + "/nix/store/6yzhscrg2hars5247ggib97gv0kxzznw-python3.11-ujson-5.8.0/lib/python3.11/site-packages\n", + "/nix/store/2wbhf77h5nbj1qna8v6qxspmpwpab0zj-python3.11-xarray-2023.8.0/lib/python3.11/site-packages\n", + "/nix/store/l57n7rysfkxkw3h71nkjd8bhb68k6vc2-python3.11-setuptools-68.2.2/lib/python3.11/site-packages\n", + "/nix/store/dli2539a3mkywn9dn13nw8b0dkk6zqf1-gdal-3.7.3/lib/python3.11/site-packages\n", + "/nix/store/n8aav0k57s73wlczxf3q7s1md4nrgdrk-python3.11-geopandas-0.14.1/lib/python3.11/site-packages\n", + "/nix/store/61zsncqvrb9m0cggj6l93y3gsh0ghwkl-python3.11-fiona-1.9.5/lib/python3.11/site-packages\n", + "/nix/store/kxsig737j8kvibwva7asq9skjbry546z-python3.11-attrs-23.1.0/lib/python3.11/site-packages\n", + "/nix/store/qid0zci3kwx242r6cfzxmcigfxg6kpwb-python3.11-certifi-2023.07.22/lib/python3.11/site-packages\n", + "/nix/store/r725a3hx83v9k6222xc6kamf8rmzzlxs-python3.11-click-8.1.7/lib/python3.11/site-packages\n", + "/nix/store/abv66mlghr72428glc3ncr1jdymc1x2h-python3.11-cligj-0.7.2/lib/python3.11/site-packages\n", + "/nix/store/8357ljwhpfkd82g4v49br0714vk6xac5-python3.11-click-plugins-1.1.1/lib/python3.11/site-packages\n", + "/nix/store/7hzr78zp2hm38g1vn3szwygw34wxmr22-python3.11-munch-4.0.0/lib/python3.11/site-packages\n", + "/nix/store/h28ihwcbfk1dzqdaviwawy3n89ydxfv2-python3.11-pbr-5.11.1/lib/python3.11/site-packages\n", + "/nix/store/n36qqxrybbc1l7kw43qav8wmlsy5k2bw-python3.11-pyproj-3.6.1/lib/python3.11/site-packages\n", + "/nix/store/q57ga306w6y4bd5c31sg083nlm6zyd7d-python3.11-shapely-2.0.2/lib/python3.11/site-packages\n", + "/nix/store/lss22z6b7ggliqk3nzi2cr9662lbm63j-python3.11-mapbox-earcut-1.0.1/lib/python3.11/site-packages\n", + "/nix/store/wrbyq5yb77nrdbmk367z815hx7f8zk58-python3.11-pydeck-0.8.0/lib/python3.11/site-packages\n", + "/nix/store/aazbbp2l63zcdhdgfa3996r7qiaxy4pl-python3.11-Jinja2-3.1.3/lib/python3.11/site-packages\n", + "/nix/store/d4y7qq9aavpd299q5vz3jxffc1irq9bi-python3.11-babel-2.12.1/lib/python3.11/site-packages\n", + "/nix/store/l29b0flb9rhnb2vnwd27y6v2ns7ws4d4-python3.11-markupsafe-2.1.3/lib/python3.11/site-packages\n", + "/nix/store/2ijz9zhs8dh957g391l46vpsmfk6jddy-python3.11-jupyter-1.0.0/lib/python3.11/site-packages\n", + "/nix/store/wnan2abcbmah9j9dcdjmbb9dmq0k91p2-python3.11-notebook-7.0.6/lib/python3.11/site-packages\n", + "/nix/store/wz102c8bza06n5752jw5fpis9v3kqfaf-python3.11-jupyter-server-2.12.4/lib/python3.11/site-packages\n", + "/nix/store/6ndj9sfxab7c3355h0vvfzzgxhr8qmlr-python3.11-argon2-cffi-23.1.0/lib/python3.11/site-packages\n", + "/nix/store/n29vss23q428x3z8xw7q253807ni7859-python3.11-argon2-cffi-bindings-21.2.0/lib/python3.11/site-packages\n", + "/nix/store/0d7jz9cd4gll2ss72558wfciihdqar17-python3.11-tornado-6.3.3/lib/python3.11/site-packages\n", + "/nix/store/dgwmdm2bqd5bmj6l68aw07rhsd720nla-python3.11-pyzmq-25.1.1/lib/python3.11/site-packages\n", + "/nix/store/jiwq4cdxsr70ixv9l0ip05zrxmvlxf0b-python3.11-py-1.11.0/lib/python3.11/site-packages\n", + "/nix/store/hsk11p4ynyrnk2cirbddpqhkn68qamck-python3.11-traitlets-5.10.0/lib/python3.11/site-packages\n", + "/nix/store/12hmc26wmyjz104igxw5c3m0ll1pqvsw-python3.11-jupyter-core-5.5.1/lib/python3.11/site-packages\n", + "/nix/store/bz33bdr72ma22f751y0jlc04sdmgfqnp-python3.11-jupyter_client-8.3.1/lib/python3.11/site-packages\n", + "/nix/store/qypmdrl1q8sbhaazrsss21wwqk537dpx-python3.11-entrypoints-0.4/lib/python3.11/site-packages\n", + "/nix/store/wqgjaml9p1699dfqrcxjb5pvy9rbd8lz-python3.11-nest_asyncio-1.5.6/lib/python3.11/site-packages\n", + "/nix/store/y6g5yjf5hmf2pk8dvadrpfllcip1xg96-python3.11-jupyter-events-0.9.0/lib/python3.11/site-packages\n", + "/nix/store/jccgq448mk4w1z0jmxaibawmcmi5hpvw-python3.11-jsonschema-4.19.0/lib/python3.11/site-packages\n", + "/nix/store/ddnpbkmf8s85n5iw8yda96zh2kibgi43-python3.11-jsonschema-specifications-2023.7.1/lib/python3.11/site-packages\n", + "/nix/store/y04w01dhh8yrbqhiapa86h59hrk7qydf-python3.11-referencing-0.30.2/lib/python3.11/site-packages\n", + "/nix/store/05sh7h92jvzj80chkwda6aa4ys7alj0c-python3.11-rpds-py-0.10.3/lib/python3.11/site-packages\n", + "/nix/store/40rzc8rgx05sklaxkzh45cj0k2zn6084-python3.11-python-json-logger-2.0.7/lib/python3.11/site-packages\n", + "/nix/store/56ji9fwnh8ahwrxbabxlc8l7cvc8cc8n-python3.11-pyyaml-6.0.1/lib/python3.11/site-packages\n", + "/nix/store/l87iyhky0f087v90bk7m5j108achza3q-python3.11-fqdn-1.5.1/lib/python3.11/site-packages\n", + "/nix/store/ay3xqrv5b1v2q8di2sg9m6zya1v3mni9-python3.11-idna-3.4/lib/python3.11/site-packages\n", + "/nix/store/5wpzibn4c5s56cvydjk139xknysn7y70-python3.11-isoduration-20.11.0/lib/python3.11/site-packages\n", + "/nix/store/7my6fnbdr2zaxd900ms772qvbwfm4fq7-python3.11-arrow-1.2.3/lib/python3.11/site-packages\n", + "/nix/store/zxk67wqpk3h80rn7knjrx2yyx8qqs4sy-python3.11-jsonpointer-2.4/lib/python3.11/site-packages\n", + "/nix/store/7k0y680rcas4w0larrvgjj00nfz84ci6-python3.11-rfc3339-validator-0.1.4/lib/python3.11/site-packages\n", + "/nix/store/fvqs0r2ql2pd1h8a7fmg5vw2fmq4753n-python3.11-rfc3986-validator-0.1.1/lib/python3.11/site-packages\n", + "/nix/store/wmc6gjsi97vbfwn301kh4kf0iihjbvab-python3.11-uri-template-1.3.0/lib/python3.11/site-packages\n", + "/nix/store/5snxzfsybi44v28xwqpa1zcwn0cirgq3-python3.11-webcolors-1.13/lib/python3.11/site-packages\n", + "/nix/store/dl2bzj0xpr435f06c9yxlh6rr6z1kic4-python3.11-jupyter-server-terminals-0.4.4/lib/python3.11/site-packages\n", + "/nix/store/yhl86fzawka9w0jb419bnkaadkqz95yj-python3.11-terminado-0.17.1/lib/python3.11/site-packages\n", + "/nix/store/v19r7khix94a31dgm2v8zjcrvn94999b-python3.11-ptyprocess-0.7.0/lib/python3.11/site-packages\n", + "/nix/store/ppzld4ckr91shc1p8p8swqp41755ibw0-python3.11-nbformat-5.9.2/lib/python3.11/site-packages\n", + "/nix/store/3p7jkl3v446p36mqqprn6bfj8lk0jknk-python3.11-fastjsonschema-2.16.2/lib/python3.11/site-packages\n", + "/nix/store/c9fc8d080yxvx7z4hs7yy0v8gc4md5dm-python3.11-nbconvert-7.11.0/lib/python3.11/site-packages\n", + "/nix/store/3pn3sn5rb1hyw8jbkv55q80dg6k1kvz9-python3.11-bleach-6.0.0/lib/python3.11/site-packages\n", + "/nix/store/js40yzmc19br9gn9spclv9bgc73mskm4-python3.11-html5lib-1.1/lib/python3.11/site-packages\n", + "/nix/store/2cg5fsl5nscn6m844330cdigbnvq2j5d-python3.11-webencodings-0.5.1/lib/python3.11/site-packages\n", + "/nix/store/0i7ddagzmx2w7wi9f8j5iks22a6m43w2-python3.11-jupyterlab_pygments-0.2.2/lib/python3.11/site-packages\n", + "/nix/store/had7brpq7d41xygjh026aqj24qd46vh4-python3.11-pygments-2.16.1/lib/python3.11/site-packages\n", + "/nix/store/xrx2l44kxhzgbpasc2shj3rzj10z2s9y-python3.11-mistune-3.0.2/lib/python3.11/site-packages\n", + "/nix/store/dqj7c7ymh2d6s9l1yplblwzwfsd41838-python3.11-nbclient-0.8.0/lib/python3.11/site-packages\n", + "/nix/store/6d0dzgglcayblnw1h0qk6yxjqc47b4z2-python3.11-async-generator-1.10/lib/python3.11/site-packages\n", + "/nix/store/kpiyiaxf8a73ppw8mdj8d1zpmqc0d8hg-python3.11-pandocfilters-1.5.0/lib/python3.11/site-packages\n", + "/nix/store/8hv8rn5r781i0623wi5jpkwfqkrrhli0-python3.11-tinycss2-1.2.1/lib/python3.11/site-packages\n", + "/nix/store/a53ssqxkl25vz8vg78c8h540i2nj0mz8-python3.11-Send2Trash-1.8.2/lib/python3.11/site-packages\n", + "/nix/store/q6pibbbcijiifgwlifxd6y713jqyx1pi-python3.11-prometheus-client-0.17.1/lib/python3.11/site-packages\n", + "/nix/store/kdbkrzb10r7vyzabrbyn92s56nkiq3la-python3.11-anyio-4.0.0/lib/python3.11/site-packages\n", + "/nix/store/gipfwgigll34mmn35nmy8k6xa0pq7lh9-python3.11-sniffio-1.3.0/lib/python3.11/site-packages\n", + "/nix/store/kb2kd2y56ak0lbqg3hq185m9m5s3yxmm-python3.11-websocket-client-1.6.3/lib/python3.11/site-packages\n", + "/nix/store/8bbxp5iccpz109mms11gbrqnwm99y3dd-python3.11-python-socks-2.4.2/lib/python3.11/site-packages\n", + "/nix/store/46831zvpwqyl5ifs2fi9fd008w81c31d-python3.11-trio-0.22.2/lib/python3.11/site-packages\n", + "/nix/store/yaadmcha9g2k3mbgv99pblqf4i9qqnym-python3.11-sortedcontainers-2.4.0/lib/python3.11/site-packages\n", + "/nix/store/2nkxw2kkhm2a521ap91cjkd55ivf4p3q-python3.11-outcome-1.2.0/lib/python3.11/site-packages\n", + "/nix/store/85my8a2nxqq1kdifb0k2drvypkd6d42y-python3.11-curio-1.6/lib/python3.11/site-packages\n", + "/nix/store/v3y1wqy045dhhsk2g0751b8ln8cf0iay-python3.11-async-timeout-4.0.3/lib/python3.11/site-packages\n", + "/nix/store/kvwqsbzikk5k1bsiz4z8rik9w3mrcwln-python3.11-typing-extensions-4.7.1/lib/python3.11/site-packages\n", + "/nix/store/m3cd0rrp916k9zlsrlfhfp51dshwf1kp-python3.11-overrides-7.4.0/lib/python3.11/site-packages\n", + "/nix/store/jyz17sp16ijjr4v0ym05isp2cikxsdw1-python3.11-jupyterlab-4.0.11/lib/python3.11/site-packages\n", + "/nix/store/1jvaz2qq33xadca7n9nwnagf3j5377fr-python3.11-async-lru-2.0.4/lib/python3.11/site-packages\n", + "/nix/store/bj22xxadlmy1h56im399jaqly8z4i77b-python3.11-ipykernel-6.27.1/lib/python3.11/site-packages\n", + "/nix/store/9mgfnczg7nyagcykxyvmjbr9agxcv30k-python3.11-comm-0.1.4/lib/python3.11/site-packages\n", + "/nix/store/aaj47dks6yzzamfcywlr4csi7j4204yf-python3.11-ipython-8.15.0/lib/python3.11/site-packages\n", + "/nix/store/r61pqk5i1hk8jb3yg04nyxd4g7ccz9gl-python3.11-backcall-0.2.0/lib/python3.11/site-packages\n", + "/nix/store/yvbgp7yd4khn53z06cqcs2hkvcwhp021-python3.11-decorator-5.1.1/lib/python3.11/site-packages\n", + "/nix/store/xkycwj5x6jz399wp5f97d6bmvj8jh9h8-python3.11-jedi-0.19.1/lib/python3.11/site-packages\n", + "/nix/store/lmx0nid14zyi6fw2ri9l686nj35cgmw7-python3.11-parso-0.8.3/lib/python3.11/site-packages\n", + "/nix/store/5kj70id5p73hx48hdijzkh77n7bgfbpk-python3.11-matplotlib-inline-0.1.6/lib/python3.11/site-packages\n", + "/nix/store/vild1h964x9phgbnr8hbiw9g3z51xfmy-python3.11-pexpect-4.8.0/lib/python3.11/site-packages\n", + "/nix/store/xvn2i9nm9xf8r48r1vssl5lbsqnl5b7x-python3.11-pickleshare-0.7.5/lib/python3.11/site-packages\n", + "/nix/store/hiy3bd36nqzr1my9r42mn5fi50fc6dax-python3.11-path-16.7.1/lib/python3.11/site-packages\n", + "/nix/store/z7b7z01wf06xnwfw30h97ys2f63xnzbf-python3.11-prompt-toolkit-3.0.39/lib/python3.11/site-packages\n", + "/nix/store/g93hhndy49jyriqv9lbs4kj5dy05is7x-python3.11-wcwidth-0.2.6/lib/python3.11/site-packages\n", + "/nix/store/00p019mr8aq1n5l9jm03xhbx39c9rsg8-python3.11-stack-data-0.2.0/lib/python3.11/site-packages\n", + "/nix/store/apii65ly5syin3a1l8jh511wrq950x9r-python3.11-asttokens-2.4.0/lib/python3.11/site-packages\n", + "/nix/store/8xaamxv3wbcx3y0yri9ggcp8k0077ddi-python3.11-executing-1.2.0/lib/python3.11/site-packages\n", + "/nix/store/fq033lz1arbsx4fw72nsdylpvvg7c6q0-python3.11-pure_eval-0.2.2/lib/python3.11/site-packages\n", + "/nix/store/i1p7bl57d6q1qz06877lsi894angh1y8-python3.11-toml-0.10.2/lib/python3.11/site-packages\n", + "/nix/store/qagkcwadqwlcsz2x6v323737qlqpl54l-python3.11-psutil-5.9.6/lib/python3.11/site-packages\n", + "/nix/store/v4c32a3hskwgdx9ib48jz0i0iqdndx0x-python3.11-jupyter-lsp-2.2.0/lib/python3.11/site-packages\n", + "/nix/store/l314y8mx7zfv1l622jvsa531qipjkzdr-python3.11-jupyterlab-server-2.25.1/lib/python3.11/site-packages\n", + "/nix/store/5sjkg26zwr0jig4apnf9ggkang9nwnzv-python3.11-json5-0.9.14/lib/python3.11/site-packages\n", + "/nix/store/63bdh4w3sns11yhyp1yhszx7wr5zb7a5-python3.11-requests-2.31.0/lib/python3.11/site-packages\n", + "/nix/store/1xzbdhw9fxmf5kgm9i7pgyis8qcg00fh-python3.11-brotlicffi-1.1.0.0/lib/python3.11/site-packages\n", + "/nix/store/xf4gxxn24rwl31mc3fv68l7pxmywcwvp-python3.11-charset-normalizer-3.2.0/lib/python3.11/site-packages\n", + "/nix/store/dz7d9if58b9g4r7zaa0b51yvx7phic8s-python3.11-urllib3-2.0.7/lib/python3.11/site-packages\n", + "/nix/store/xnccfp6ycq2n9wqqhq4wx9640vd33wjm-python3.11-notebook-shim-0.2.3/lib/python3.11/site-packages\n", + "/nix/store/gj1yhp8944gja5q4mv3yhvmxbh8ddq4k-python3.11-qtconsole-5.4.4/lib/python3.11/site-packages\n", + "/nix/store/21dih3gm9qmfpgd8lpa46dbpd4sc9dfp-python3.11-ipython-genutils-0.2.0/lib/python3.11/site-packages\n", + "/nix/store/x6g64xckrmfxzg4zxs7maqxc12j3dbry-python3.11-dbus-python-1.2.18/lib/python3.11/site-packages\n", + "/nix/store/sqgg4kxn0sn1m35qq2874l38jyp5s8km-python3.11-pyqt5-sip-12.11.0/lib/python3.11/site-packages\n", + "/nix/store/vhdiyk4fc6vrwl5pn40wb290hjmfcwxf-python3.11-PyQt5-5.15.9/lib/python3.11/site-packages\n", + "/nix/store/0820lfw3071r9p6c31a3hjk1d6fm3m0c-python3.11-QtPy-2.4.0/lib/python3.11/site-packages\n", + "/nix/store/zgjqiajl1krm9k45mnf7gj776csbgcny-python3.11-jupyter-console-6.6.3/lib/python3.11/site-packages\n", + "/nix/store/f16ihwplq3dri6g0my0kic3n4dxcgyrh-python3.11-ipywidgets-8.1.1/lib/python3.11/site-packages\n", + "/nix/store/f566brfx19xpsxq6f0k1rqi1rbg5qwiv-python3.11-jupyterlab-widgets-3.0.9/lib/python3.11/site-packages\n", + "/nix/store/jwkc02fk60kkdsmh14gxggg79604h4s6-python3.11-widgetsnbextension-4.0.9/lib/python3.11/site-packages\n", + "/nix/store/g7s4dhk6ndgkik80pqw2xa4kagmv9xrr-python3.11-ipympl-0.9.3/lib/python3.11/site-packages\n", + "/nix/store/yvhwsfbh4bc99vfvwpaa70m4yng4pvpz-python3-3.11.8/lib/python311.zip\n", + "/nix/store/yvhwsfbh4bc99vfvwpaa70m4yng4pvpz-python3-3.11.8/lib/python3.11\n", + "/nix/store/yvhwsfbh4bc99vfvwpaa70m4yng4pvpz-python3-3.11.8/lib/python3.11/lib-dynload\n", + "/home/timlinux/dev/python/geo3D/.venv/lib/python3.11/site-packages\n" + ] + } + ], + "source": [ + "import sys\n", + "for p in sys.path:\n", + " print (p)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, "outputs": [], "source": [ "import warnings\n", @@ -57,7 +231,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -74,7 +248,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -91,9 +265,22 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "FileNotFoundError", + "evalue": "[Errno 2] No such file or directory: './data/fp-test.geojson'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[5], line 23\u001b[0m\n\u001b[1;32m 20\u001b[0m gj \u001b[38;5;241m=\u001b[39m osm2geojson\u001b[38;5;241m.\u001b[39mjson2geojson(r\u001b[38;5;241m.\u001b[39mjson())\n\u001b[1;32m 22\u001b[0m \u001b[38;5;66;03m#-- store the data as GeoJSON\u001b[39;00m\n\u001b[0;32m---> 23\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mjparams\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mori-gjson_out\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mw\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m outfile: \n\u001b[1;32m 24\u001b[0m json\u001b[38;5;241m.\u001b[39mdump(gj, outfile)\n", + "File \u001b[0;32m/nix/store/aaj47dks6yzzamfcywlr4csi7j4204yf-python3.11-ipython-8.15.0/lib/python3.11/site-packages/IPython/core/interactiveshell.py:286\u001b[0m, in \u001b[0;36m_modified_open\u001b[0;34m(file, *args, **kwargs)\u001b[0m\n\u001b[1;32m 279\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m file \u001b[38;5;129;01min\u001b[39;00m {\u001b[38;5;241m0\u001b[39m, \u001b[38;5;241m1\u001b[39m, \u001b[38;5;241m2\u001b[39m}:\n\u001b[1;32m 280\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[1;32m 281\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mIPython won\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mt let you open fd=\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mfile\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m by default \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 282\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mas it is likely to crash IPython. If you know what you are doing, \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 283\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124myou can use builtins\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m open.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 284\u001b[0m )\n\u001b[0;32m--> 286\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mio_open\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n", + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: './data/fp-test.geojson'" + ] + } + ], "source": [ "#buildings\n", "query = \"\"\"\n", @@ -123,7 +310,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1407,9 +1594,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (Spyder)", - "language": "python3", - "name": "python3" + "display_name": "virtualenv", + "language": "python", + "name": "virtualenv" }, "language_info": { "codemirror_mode": { @@ -1421,7 +1608,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.11.8" } }, "nbformat": 4, diff --git a/requirements.txt b/requirements.txt index 0174a8e..5d66569 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,17 +1,16 @@ -#### ESSENTIAL LIBRARIES FOR MAIN FUNCTIONALITY #### -#-- conda-forge then pip - -#conda -python = 3.8.18 -geopandas = 0.13.2 -mapbox_earcut = 1.0.1 -pydeck = 0.8.0 -topojson = 1.7 - -#pip -triangle = 20230923 #- python wrapper around Jonathan Richard Shewchuk's at rufat.be/triangle -cjio = 0.7.3 #- python CLI to process and manipulate CityJSON files -overpass = 0.7 -osm2geojson = 0.2.4 -openlocationcode = 1.0.1 #- google 'plus codes' at https://github.com/google/open-location-code - +#### ESSENTIAL LIBRARIES FOR MAIN FUNCTIONALITY #### +#-- conda-forge then pip + +#conda +#python==3.8.18 +geopandas==0.13.2 +mapbox_earcut==1.0.1 +pydeck==0.8.0 +topojson==1.7 + +#pip +triangle==20230923 #- python wrapper around Jonathan Richard Shewchuk's at rufat.be/triangle +cjio==0.7.3 #- python CLI to process and manipulate CityJSON files +overpass==0.7 +osm2geojson==0.2.4 +openlocationcode==1.0.1 #- google 'plus codes' at https://github.com/google/open-location-code diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..300c66f --- /dev/null +++ b/shell.nix @@ -0,0 +1,84 @@ +with import { }; +let + # For packages pinned to a specific version + pinnedHash = "nixos-23.11"; + pinnedPkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/${pinnedHash}.tar.gz") { }; + pythonPackages = python3Packages; +in pkgs.mkShell rec { + name = "impurePythonEnv"; + venvDir = "./.venv"; + buildInputs = [ + # A Python interpreter including the 'venv' module is required to bootstrap + # the environment. + pythonPackages.python + + # This executes some shell code to initialize a venv in $venvDir before + # dropping into the shell + pythonPackages.venvShellHook + pinnedPkgs.virtualenv + # Those are dependencies that we would like to use from nixpkgs, which will + # add them to PYTHONPATH and thus make them accessible from within the venv. + pythonPackages.numpy + pinnedPkgs.git + pythonPackages.pip + pythonPackages.numpy + pythonPackages.overpy + pythonPackages.osmpythontools + pythonPackages.setuptools + pythonPackages.gdal + pythonPackages.geopandas + pythonPackages.mapbox-earcut + pythonPackages.pydeck + pythonPackages.overpy + pythonPackages.jupyter + pythonPackages.ipython + pythonPackages.ipympl + pinnedPkgs.vim + pinnedPkgs.git + pinnedPkgs.wget + pinnedPkgs.gotop + # For printing from jupyter + # The list after scheme-small and latex are all .sty latex + # modules that are needed for jupyter printing to work. + # I obtained the list from this issue: + # https://github.com/jupyter/nbconvert/issues/1328#issue-659661022 + # Scheme-small is a small footprint latext install. The + # latex schemes and the sytax for the entry below are + # described here: + # https://nixos.wiki/wiki/TexLive + # To actually generate a pdf in jupyter, do + # File -> Save and export notebook as -> PDF + (pinnedPkgs.texlive.combine { inherit (texlive) + scheme-small latex adjustbox caption collectbox enumitem environ eurosym jknapltx + parskip pgf rsfs tcolorbox titling trimspaces ucs ulem upquote + lastpage titlesec advdate pdfcol soul + collection-langgerman collection-langenglish + ;}) + ]; + # Run this command, only after creating the virtual environment + PROJECT_ROOT = builtins.getEnv "PWD"; + + postVenvCreation = '' + unset SOURCE_DATE_EPOCH + pip install -r requirements.txt + echo "-----------------------" + echo "🌈 Your Dev Environment is prepared." + echo "Run ./impute.py" + echo "" + echo "📒 Note:" + echo "-----------------------" + echo "start vscode like this:" + echo "" + echo "./vscode.sh" + echo "-----------------------" + ''; + + # Now we can execute any commands within the virtual environment. + # This is optional and can be left out to run pip manually. + postShellHook = '' + # allow pip to install wheels + unset SOURCE_DATE_EPOCH + ''; + + +} diff --git a/vscode.sh b/vscode.sh new file mode 100755 index 0000000..1d2fa4a --- /dev/null +++ b/vscode.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +echo "🪛 Installing VSCode Extensions:" +echo "--------------------------------" +code --extensions-dir=".vscode-extensions" --install-extension donjayamanne.python-environment-manager +code --extensions-dir=".vscode-extensions" --install-extension donjayamanne.python-extension-pack +code --extensions-dir=".vscode-extensions" --install-extension hbenl.vscode-test-explorer +code --extensions-dir=".vscode-extensions" --install-extension jamesqquick.python-class-generator +code --extensions-dir=".vscode-extensions" --install-extension KevinRose.vsc-python-indent +code --extensions-dir=".vscode-extensions" --install-extension littlefoxteam.vscode-python-test-adapter +code --extensions-dir=".vscode-extensions" --install-extension ms-python.debugpy +code --extensions-dir=".vscode-extensions" --install-extension ms-python.python +code --extensions-dir=".vscode-extensions" --install-extension ms-python.vscode-pylance +code --extensions-dir=".vscode-extensions" --install-extension ms-vscode.test-adapter-converter +code --extensions-dir=".vscode-extensions" --install-extension njpwerner.autodocstring +code --extensions-dir=".vscode-extensions" --install-extension VisualStudioExptTeam.intellicode-api-usage-examples +code --extensions-dir=".vscode-extensions" --install-extension VisualStudioExptTeam.vscodeintellicode + +code --extensions-dir=".vscode-extensions" .