Git Product home page Git Product logo

t4gpd's Introduction

t4gpd

Set of tools based on Python, GeoPandas and Shapely to achieve urban geoprocessing

Pre-requisites

To be able to use the t4gpd plugin, perform geoprocessing and display your own maps, you need a Python3 interpreter and recent versions of the geopandas, matplotlib, numpy, and shapely libraries. One possibility is to install a Miniconda3 environment, in which you will first create and then configure a new environment (we will call it gpd):

conda create -n gpd

conda activate gpd

conda config --env --add channels conda-forge

conda config --env --set channel_priority strict

conda install python=3.10 geopandas=0.12.2 contextily geocube imageio jupyterlab mapclassify matplotlib matplotlib-scalebar meshio networkx notebook openpyxl plotly pvlib Pyarrow pysolar pyvista pywavelets rasterio scikit-learn scipy seaborn windrose xlrd xlwt

pip install dijkstar pythermalcomfort suntimes

Installation instructions

As t4gpd is now on PyPI, the easiest way to install the latest version is to use the pip command as follows:

pip install t4gpd

Alternatively, you can download the t4gpd latest version from the SourceSup website. Then, install the Python3 plugin you downloaded:

pip install t4gpd-0.9.5.tar.gz

Read the documentation

Go to https://t4gpd-docs.readthedocs.io to consult the documentation.

t4gpd's People

Contributors

thomas-leduc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

bbrangeo

t4gpd's Issues

Isovist example is broken

As mentioned by @MarkDunneImprobable in another repo, isovist example is broken.

File C:\ProgramData\Miniconda3\lib\site-packages\t4gpd\commons\RayCastingLib.py:175, in RayCastingLib.multipleRayCast2D(masksGdf, masksSIdx, viewPoint, shootingDirs, rayLength)
    173     raise IllegalArgumentTypeException(masksGdf, 'GeoDataFrame')
    174 if not isinstance(masksSIdx, (SpatialIndex, Index)):
--> 175     raise IllegalArgumentTypeException(masksSIdx, 'SpatialIndex or Index')
    176 if not isinstance(viewPoint, Point):
    177     raise IllegalArgumentTypeException(viewPoint, 'Point')

IllegalArgumentTypeException: 
----------------------------------------------------------------------
*** Illegal argument: 
*** Instead of: <geopandas.sindex.PyGEOSSTRTreeIndex object at 0x00000261F3141040>
*** a SpatialIndex or Index was expected!

Unlike @MarkDunneImprobable, I don't know how ti fix this. Any pointers?
Thanks!

Estimation of view factors using ray casting (version 0.4.0+)

Hi Thomas,

Example : Estimation of view factors using ray casting (version 0.4.0+) does not work.

Bug in file MoveSensorsAwayFromSurface.py

n ==> return nan

`
def runWithArgs(self, row):
p = row.geometry
assert isinstance(p, Point), 'sensorsGdf must be a GeoDataFrame of Points'
n = row[self.normalFieldname]
# print(p.x )
# print(self.dist)
# print(n)
# print(type(n))
# import math
#
# if isinstance(n,float) and math.isnan(n):
# n=(0,0,0)

    return { 'geometry': Point([
        p.x + self.dist * n[0],
        p.y + self.dist * n[1],
        p.z + self.dist * n[2],
        ]) }

`

Boris

DatetimeLib usage in energy.geoProcesses.DirectSolarIrradiation.py

I think there is a little code malfunction in DirectSolarIrradiation.py
Indeed, whatever the dtStart, dtStop values (ex: datetime(2021, 12, 21, 6), datetime(2021, 12, 21, 12)), the calculation is done for the entire day. I suggest this change

datetimes = DatetimeLib.range(dtStart, dtStop, dtDelta)
import pandas as pd
datetimes = [x.to_pydatetime() for x in pd.date_range(start=dtStart, end=dtStop, freq=freq, tz='Europe/Paris').tolist()]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.