TL;DR version: I need to break up road vectors in QGIS to 4,033km2 tiles to import into an UnrealEngine landscape.

I am evaluating a plugin the imports GIS data into UnrealEngine for a simulation. One of the best things about this plugin is that it can import shapefiles to create landscape splines (that's roads and rivers and such for all the non-game programmer types, since this S.E. is about GIS, not UE). It's really great, but for landscapes greater than 16km2 or so in UE, you need to import the data into landscape tiles.

I'm using QGIS to grab the overall data area I want, but I need it broken up into tiles. The topography DEM information was easy enough to split into tiles, but I am having a hard time breaking up the shapefile data. Does anyone here know of any tools for taking a larger-area shapefile and breaking it up into chunks of a specific size?

  • create a raster grid of desired size, convert to polygon, intersect to roads...? Aug 29 '20 at 0:49
  • Use gdal.org/programs/ogr2ogr.html with -spat or -clipsrc option. Write a script for cutting the tiles with one run.
    – user30184
    Aug 31 '20 at 5:54
  • @user30184, I noticed that QGIS is one of the programs on your link listed as implementing GDAL. Do you happen to know if I can write said script into QGIS as a macro? Or would this have to be executed command-line from a linux environment? Sep 1 '20 at 13:06
  • I guess that both are doable with about the same amount of work if one knows Python for QGIS scripting docs.qgis.org/3.10/en/docs/pyqgis_developer_cookbook/index.html or has bash shell wisdom for the command line.
    – user30184
    Sep 1 '20 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.