Skip to content

Instantly share code, notes, and snippets.

@joinr
Last active May 17, 2021 10:10
Show Gist options
  • Save joinr/74e54c6ca7a56432bce23af909f1314f to your computer and use it in GitHub Desktop.
Save joinr/74e54c6ca7a56432bce23af909f1314f to your computer and use it in GitHub Desktop.
qgis tile maker
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.18.2-Zürich" projectname="" saveUser="tom" saveDateTime="2021-05-17T05:05:20" saveUserFull="tom">
<homePath path=""/>
<title></title>
<autotransaction active="0"/>
<evaluateDefaultValues active="0"/>
<trust active="0"/>
<projectCrs>
<spatialrefsys>
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["unknown"],AREA["World - 85°S to 85°N"],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
<srsid>3857</srsid>
<srid>3857</srid>
<authid>EPSG:3857</authid>
<description>WGS 84 / Pseudo-Mercator</description>
<projectionacronym>merc</projectionacronym>
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</projectCrs>
<layer-tree-group>
<customproperties/>
<layer-tree-layer expanded="1" legend_exp="" name="bluemarble" legend_split_behavior="0" source="type=xyz&amp;url=http://s3.amazonaws.com/com.modestmaps.bluemarble/%7BZ%7D-r%7BY%7D-c%7BX%7D.jpg&amp;zmax=18&amp;zmin=0" checked="Qt::Checked" providerKey="wms" patch_size="-1,-1" id="bluemarble_4e88dcfc_3b05_4c59_9a71_3f7a7717d07e">
<customproperties/>
</layer-tree-layer>
<custom-order enabled="0">
<item>bluemarble_4e88dcfc_3b05_4c59_9a71_3f7a7717d07e</item>
</custom-order>
</layer-tree-group>
<snapping-settings enabled="0" tolerance="12" scaleDependencyMode="0" unit="1" maxScale="0" mode="2" self-snapping="0" minScale="0" type="1" intersection-snapping="0">
<individual-layer-settings/>
</snapping-settings>
<relations/>
<polymorphicRelations/>
<mapcanvas name="theMapCanvas" annotationsVisible="1">
<units>meters</units>
<extent>
<xmin>-19724422.27493316307663918</xmin>
<ymin>-18937808.4689730703830719</ymin>
<xmax>19724422.27493316307663918</xmax>
<ymax>18937808.46897311508655548</ymax>
</extent>
<rotation>0</rotation>
<destinationsrs>
<spatialrefsys>
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["unknown"],AREA["World - 85°S to 85°N"],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
<srsid>3857</srsid>
<srid>3857</srid>
<authid>EPSG:3857</authid>
<description>WGS 84 / Pseudo-Mercator</description>
<projectionacronym>merc</projectionacronym>
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</destinationsrs>
<rendermaptile>0</rendermaptile>
<expressionContextScope/>
</mapcanvas>
<projectModels/>
<legend updateDrawingOrder="true">
<legendlayer showFeatureCount="0" name="bluemarble" checked="Qt::Checked" drawingOrder="-1" open="true">
<filegroup hidden="false" open="true">
<legendlayerfile visible="1" isInOverview="0" layerid="bluemarble_4e88dcfc_3b05_4c59_9a71_3f7a7717d07e"/>
</filegroup>
</legendlayer>
</legend>
<mapViewDocks/>
<mapViewDocks3D/>
<mapcanvas name="mAreaCanvas" annotationsVisible="1">
<units>degrees</units>
<extent>
<xmin>0</xmin>
<ymin>0</ymin>
<xmax>0</xmax>
<ymax>0</ymax>
</extent>
<rotation>0</rotation>
<destinationsrs>
<spatialrefsys>
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt>
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
<srsid>3452</srsid>
<srid>4326</srid>
<authid>EPSG:4326</authid>
<description>WGS 84</description>
<projectionacronym>longlat</projectionacronym>
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
<geographicflag>true</geographicflag>
</spatialrefsys>
</destinationsrs>
<rendermaptile>0</rendermaptile>
<expressionContextScope/>
</mapcanvas>
<main-annotation-layer autoRefreshTime="0" refreshOnNotifyMessage="" refreshOnNotifyEnabled="0" autoRefreshEnabled="0" type="annotation">
<id>Annotations_e83b5af2_8669_4d91_8b20_06427d78697a</id>
<datasource></datasource>
<keywordList>
<value></value>
</keywordList>
<layername>Annotations</layername>
<srs>
<spatialrefsys>
<wkt></wkt>
<proj4></proj4>
<srsid>0</srsid>
<srid>0</srid>
<authid></authid>
<description></description>
<projectionacronym></projectionacronym>
<ellipsoidacronym></ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</srs>
<resourceMetadata>
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type></type>
<title></title>
<abstract></abstract>
<links/>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys>
<wkt></wkt>
<proj4></proj4>
<srsid>0</srsid>
<srid>0</srid>
<authid></authid>
<description></description>
<projectionacronym></projectionacronym>
<ellipsoidacronym></ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent/>
</resourceMetadata>
<items/>
<layerOpacity>1</layerOpacity>
<blendMode>0</blendMode>
</main-annotation-layer>
<projectlayers>
<maplayer autoRefreshTime="0" refreshOnNotifyMessage="" refreshOnNotifyEnabled="0" hasScaleBasedVisibilityFlag="0" maxScale="0" autoRefreshEnabled="0" minScale="1e+08" type="raster" styleCategories="AllStyleCategories">
<extent>
<xmin>-20037508.34278924390673637</xmin>
<ymin>-20037508.34278925508260727</ymin>
<xmax>20037508.34278924390673637</xmax>
<ymax>20037508.34278924390673637</ymax>
</extent>
<id>bluemarble_4e88dcfc_3b05_4c59_9a71_3f7a7717d07e</id>
<datasource>type=xyz&amp;url=http://s3.amazonaws.com/com.modestmaps.bluemarble/%7BZ%7D-r%7BY%7D-c%7BX%7D.jpg&amp;zmax=18&amp;zmin=0</datasource>
<keywordList>
<value></value>
</keywordList>
<layername>bluemarble</layername>
<srs>
<spatialrefsys>
<wkt>PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["unknown"],AREA["World - 85°S to 85°N"],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]]</wkt>
<proj4>+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs</proj4>
<srsid>3857</srsid>
<srid>3857</srid>
<authid>EPSG:3857</authid>
<description>WGS 84 / Pseudo-Mercator</description>
<projectionacronym>merc</projectionacronym>
<ellipsoidacronym>EPSG:7030</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</srs>
<resourceMetadata>
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type>dataset</type>
<title></title>
<abstract></abstract>
<links/>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys>
<wkt></wkt>
<proj4></proj4>
<srsid>0</srsid>
<srid>0</srid>
<authid></authid>
<description></description>
<projectionacronym></projectionacronym>
<ellipsoidacronym></ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent/>
</resourceMetadata>
<provider>wms</provider>
<noData>
<noDataList useSrcNoData="0" bandNo="1"/>
</noData>
<map-layer-style-manager current="default">
<map-layer-style name="default"/>
</map-layer-style-manager>
<flags>
<Identifiable>1</Identifiable>
<Removable>1</Removable>
<Searchable>1</Searchable>
<Private>0</Private>
</flags>
<temporal enabled="0" fetchMode="0" mode="0">
<fixedRange>
<start></start>
<end></end>
</fixedRange>
</temporal>
<customproperties>
<property value="Undefined" key="identify/format"/>
</customproperties>
<pipe>
<provider>
<resampling maxOversampling="2" zoomedInResamplingMethod="nearestNeighbour" enabled="false" zoomedOutResamplingMethod="nearestNeighbour"/>
</provider>
<rasterrenderer nodataColor="" opacity="1" alphaBand="-1" band="1" type="singlebandcolordata">
<rasterTransparency/>
<minMaxOrigin>
<limits>None</limits>
<extent>WholeRaster</extent>
<statAccuracy>Estimated</statAccuracy>
<cumulativeCutLower>0.02</cumulativeCutLower>
<cumulativeCutUpper>0.98</cumulativeCutUpper>
<stdDevFactor>2</stdDevFactor>
</minMaxOrigin>
</rasterrenderer>
<brightnesscontrast gamma="1" brightness="0" contrast="0"/>
<huesaturation grayscaleMode="0" colorizeOn="0" colorizeGreen="128" colorizeRed="255" colorizeBlue="128" colorizeStrength="100" saturation="0"/>
<rasterresampler maxOversampling="2"/>
<resamplingStage>resamplingFilter</resamplingStage>
</pipe>
<blendMode>0</blendMode>
</maplayer>
</projectlayers>
<layerorder>
<layer id="bluemarble_4e88dcfc_3b05_4c59_9a71_3f7a7717d07e"/>
</layerorder>
<properties>
<Digitizing>
<AvoidIntersectionsMode type="int">0</AvoidIntersectionsMode>
</Digitizing>
<Gui>
<CanvasColorBluePart type="int">255</CanvasColorBluePart>
<CanvasColorGreenPart type="int">255</CanvasColorGreenPart>
<CanvasColorRedPart type="int">255</CanvasColorRedPart>
<SelectionColorAlphaPart type="int">255</SelectionColorAlphaPart>
<SelectionColorBluePart type="int">0</SelectionColorBluePart>
<SelectionColorGreenPart type="int">255</SelectionColorGreenPart>
<SelectionColorRedPart type="int">255</SelectionColorRedPart>
</Gui>
<Legend>
<filterByMap type="bool">false</filterByMap>
</Legend>
<Measure>
<Ellipsoid type="QString">EPSG:7030</Ellipsoid>
</Measure>
<Measurement>
<AreaUnits type="QString"></AreaUnits>
<DistanceUnits type="QString"></DistanceUnits>
</Measurement>
<PAL>
<CandidatesLinePerCM type="double">5</CandidatesLinePerCM>
<CandidatesPolygonPerCM type="double">2.5</CandidatesPolygonPerCM>
<DrawRectOnly type="bool">false</DrawRectOnly>
<DrawUnplaced type="bool">false</DrawUnplaced>
<PlacementEngineVersion type="int">1</PlacementEngineVersion>
<SearchMethod type="int">0</SearchMethod>
<ShowingAllLabels type="bool">false</ShowingAllLabels>
<ShowingCandidates type="bool">false</ShowingCandidates>
<ShowingPartialsLabels type="bool">true</ShowingPartialsLabels>
<TextFormat type="int">0</TextFormat>
<UnplacedColor type="QString">255,0,0,255</UnplacedColor>
</PAL>
<Paths>
<Absolute type="bool">false</Absolute>
</Paths>
<PositionPrecision>
<Automatic type="bool">true</Automatic>
<DecimalPlaces type="int">2</DecimalPlaces>
</PositionPrecision>
<SpatialRefSys>
<ProjectionsEnabled type="int">1</ProjectionsEnabled>
</SpatialRefSys>
</properties>
<dataDefinedServerProperties>
<Option type="Map">
<Option value="" name="name" type="QString"/>
<Option name="properties"/>
<Option value="collection" name="type" type="QString"/>
</Option>
</dataDefinedServerProperties>
<visibility-presets/>
<transformContext/>
<projectMetadata>
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type></type>
<title></title>
<abstract></abstract>
<links/>
<author>tom</author>
<creation>2021-05-17T05:04:11</creation>
</projectMetadata>
<Annotations/>
<Layouts/>
<Bookmarks/>
<ProjectViewSettings UseProjectScales="0">
<Scales/>
</ProjectViewSettings>
<ProjectTimeSettings frameRate="1" timeStepUnit="h" cumulativeTemporalRange="0" timeStep="1"/>
<ProjectDisplaySettings>
<BearingFormat id="bearing">
<Option type="Map">
<Option value="" name="decimal_separator" type="QChar"/>
<Option value="6" name="decimals" type="int"/>
<Option value="0" name="direction_format" type="int"/>
<Option value="0" name="rounding_type" type="int"/>
<Option value="false" name="show_plus" type="bool"/>
<Option value="true" name="show_thousand_separator" type="bool"/>
<Option value="false" name="show_trailing_zeros" type="bool"/>
<Option value="" name="thousand_separator" type="QChar"/>
</Option>
</BearingFormat>
</ProjectDisplaySettings>
</qgis>
xyztiles datasource: bluemarble
url: http://s3.amazonaws.com/com.modestmaps.bluemarble/{Z}-r{Y}-c{X}.jpg
minzoom: 0
maxzoom: 18
DataSourceManager -> XYZ -> bluemarble -> add
Processing Tools -> Raster -> Generate XYZ Tiles (Directory)
Extent-> (calculate from layer "bluemarble"): -20037508.3428,20037508.3428,-20037508.3428,20037508.3428 [EPSG:3857]
Minimum Zoom: 0
Maximum Zoom: 5
Dpi: 96
Tile Format: png
Quality: 75
MetaTile Size: 4
Tile Width: 256
Tile Height: 256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment