Skip to content

DogFingerStudios/yanorra-maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

262 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository holds the data for the Yanorra maps and the code to generate them.

Steps to Importing Data from Azkaar's Map Generator into QGIS

A lot of these steps were taken from Azkaar's Map Generator documentation here this set of YouTube tutorials:

1. Export the map from Azkaar's Map Generator

In the Export menu, under Export to GeoJSON select the Cells button. This will download a file with the extension .geojson.

2. Smooth the cell data using add_random_points.php

The raw cell data inside the .geojson file generated from Azkaar's Map Generator has very jagged borders. To smooth them out, we can add random points along the borders of the cells.

php add_random_points.php cells.geojson > cells_smoothed.geojson

3. Import the data into QGIS

In QGIS, go to Layer > Add Layer > Add Vector Layer. Then under Source select the cells_smoothed.geojson file. This will import the cell data into QGIS.

4. Fixing Cell Data

To find the bad cells, do Vector > Geometry Tools > Check Validity. This will create a new layer with all the invalid cells.

With the correct layer selected, press Toggle Editing and then select the Vertex Tool. This will allow you to edit the vertices of the cells.

The point randomizer will sometimes flip points on thin lines to the wrong side, so when moving the verticies, you must make sure to fix adjacent cells at the same time. To ensure that, you must first right-mouse click on the toolbar and select Advanced Digitizing Toolbar. In that toolbar, select the Enable Topological Editing button. This will ensure that when you move a vertex, it will move the adjacent vertex as well.

Vertex Tool
Vertex Tool


Enable Topological Editing Button
Enable Topological Editing Buttonx

There are two types of error that are most common:

1. A single vertex extending out from the vertix, creating a line that extends out from the cell. This can be fixed by selecting the vertex and deleting it.

2. A single vertex is flipped to the wrong side of the line, creating a small triangle. This can be fixed by moving the vertex back to the correct side of the line.

5. Removing ocean and sea cells

To remove the ocean and sea cells, we can use the Select Features by Value tool. This tool allows us to select all the cells that have a certain value in a certain column. In this case, we want to select from the type column all the cells that have the value ocean.

Select Features By Value

Select Features By Value Dialog

Once we have selected those cells, we can delete them using the Delete Selected button.

Delete Selected Button

6. Cleaning up the data

Vector > Geoprocessing Tools > Dissolve. This will merge all the cells that have the same value in the type column into a single cell. Select Dissolve fields and select state. This will merge all the ocean cells into a single cell, and all the sea cells into a single cell.

Then go to Vector > Geometry Tools > Multiparts to Singleparts. This will split any cells that have multiple parts into single parts. This is necessary because some of the ocean and sea cells have multiple parts, and we want to split them into single parts so that we can delete them.

7. Importing nation/border data

To import the nation/border data, we use Layer > Add Layer > Add Delimited Text Layer. Then under Source select the CSV file, and under Geometry Definition select No Geometry (attribute only table). This will import the nation/border data into QGIS as a non-spatial table.

Adding Burg Points

Tools

This project makes extensive use of:

Scripts

add_random_points.php

This script is used after importing cells from Azkaar's Map Generator into QGIS in order to smooth out the borders of the cells.

Useage:

php add_random_points.php <filename> > <newfilename>

About

Geospatial source files and map assets for Yanorra, including cell GeoJSON exports and QGIS/Azgaar project data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors