How to convert Linestrings to Polygons in QGIS
- Import Vector Layer
- Select Linestring Layer Vector > Geometry Tools > Extract Vertices
- Install Concave Hull extension
- Select Points layer, go to Concave Hull extension -> OK
- Save Polygon layer
How to convert Linestrings to Polygons in QGIS
| Demo | |
| # Convert notebook to slides | |
| jupyter nbconvert notebook.ipynb --TagRemovePreprocessor.remove_input_tags='{"hide_input"}' --EmbedImagesPreprocessor.resize=small --to slides --post serve | |
| # Set slides to -> Slide | |
| # Set tags to "hide_input" | |
| # Convert mov to mp4 | |
| ffmpeg -i demo.mov -vcodec h264 demo.mp4 |
| # install ffmpeg | |
| brew install ffmpeg | |
| # convert .mov file to .mp4 | |
| ffmpeg -i demo.mov -vcodec h264 demo.mp4 |
| # jupyter notebook import local module | |
| import os | |
| import sys | |
| nb_dir = os.path.split(os.getcwd())[0] | |
| if nb_dir not in sys.path: | |
| sys.path.append(nb_dir) |
| # 1. Keep train, validation, and test data straight. |
| # 1. Apply works with multiple arguments | |
| ## instead of this | |
| binary_test["prediction"] = binary_test["sentence"].apply(lambda x: get_prediction(x, PROJECT_ID, BINARY_MODEL_ID)) | |
| ## do this | |
| binary_test["prediction"] = binary_test["sentence"].apply(get_predictions, project_id=PROJECT_ID, model_id=BINARY_MODEL_ID |
| # 1. Use f-strings | |
| #instead of this | |
| name = 'projects/{}/locations/us-central1/models/{}'.format(project_id, model_id) | |
| # do this | |
| name = f'projects/{project_id}/locations/us-central1/models/{model_id}' | |
| # 2. Explicitly name errors: | |
| # instead of this | |
| try: |
| import keras | |
| # Integer to categorical | |
| keras.utils.to_categorical(4, num_classes=5, dtype='int') |
| # pip cheatsheet | |
| # pip install from requirements | |
| pip install -r requirements.txt |