geo-mart / Vector-Shape-Encoder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Polygon encoding

Code and data supporting the results of the paper "Learning from vector data: enhancing vector-based shape encoding and shape classification for map generalization purposes", published in the CaGIS Special Issue "Machine Learning in Cartography".

Code

For recreating the results using Jupyter Notebooks:

For model comparison using python:

--> Just change the hyperparameters, select the features by commenting/uncommenting them in the list and run the code.

Data

How to for the case study

  1. Train the models as described above with the polygon encoding notebook.
  2. Predict the classes for the buildings in the case study and export as follows (example for 'RNN' model):
pred_case_study = {'index': [i for i in range(len(predictions))],
        'osm_id_ret': id_list,
        'clas_prediction': predictions,
        'shape_prediction': shape_predictions}
predictionsDF = pd.DataFrame(pred_case_study)
predictionsDF.to_csv('predictions_case_study-RNN.csv')
  1. Repeat for other models if wanted.
  2. Open the template matching notebook, load the csv-file and run the code.

Publication

Martin Knura (2024): Learning from vector data: enhancing vector-based shape encoding and shape classification for map generalization purposes, Cartography and Geographic Information Science, 51:1, 146-167, DOI: 10.1080/15230406.2023.2273397

About


Languages

Language:Jupyter Notebook 81.8%Language:Python 18.2%