Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@palmerj
Created February 18, 2018 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palmerj/eb25a396fecc181b2da5023c70078198 to your computer and use it in GitHub Desktop.
Save palmerj/eb25a396fecc181b2da5023c70078198 to your computer and use it in GitHub Desktop.
GDAL mbtiles vector tile VRT
<OGRVRTDataSource>
<Metadata domain="IMAGE_STRUCTURE">
<MDI key="INTERLEAVE">PIXEL</MDI>
</Metadata>
<Metadata>
<MDI key="name">parcels</MDI>
<MDI key="format">pbf</MDI>
<MDI key="center">174.6325388,-36.9883061,0</MDI>
<MDI key="ZOOM_LEVEL">14</MDI>
<MDI key="bounds">174.1821636,-37.3637475,175.0829141,-36.6128647</MDI>
<MDI key="minzoom">0</MDI>
<MDI key="version">2</MDI>
<MDI key="maxzoom">14</MDI>
<MDI key="scheme">tms</MDI>
<MDI key="type">overlay</MDI>
<MDI key="description"></MDI>
</Metadata>
<Metadata domain="DERIVED_SUBDATASETS">
<MDI key="DERIVED_SUBDATASET_1_DESC">log10 of amplitude of input bands from parcels.mbtiles</MDI>
<MDI key="DERIVED_SUBDATASET_1_NAME">DERIVED_SUBDATASET:LOGAMPLITUDE:parcels.mbtiles</MDI>
</Metadata>
<OGRVRTLayer name="nz-primary-parcels">
<SrcDataSource relativeToVRT="0" shared="1">parcels.mbtiles</SrcDataSource>
<OpenOptions>
<OOI key="ZOOM_LEVEL_AUTO">YES</OOI>
</OpenOptions>
<SrcLayer>nz-primary-parcels</SrcLayer>
<GeometryType>wkbMultiPolygon</GeometryType>
<LayerSRS>PROJCS[&quot;WGS 84 / Pseudo-Mercator&quot;,GEOGCS[&quot;WGS 84&quot;,DATUM[&quot;WGS_1984&quot;,SPHEROID[&quot;WGS 84&quot;,6378137,298.257223563,AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIMEM[&quot;Greenwich&quot;,0,AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],UNIT[&quot;degree&quot;,0.0174532925199433,AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],PROJECTION[&quot;Mercator_1SP&quot;],PARAMETER[&quot;central_meridian&quot;,0],PARAMETER[&quot;scale_factor&quot;,1],PARAMETER[&quot;false_easting&quot;,0],PARAMETER[&quot;false_northing&quot;,0],UNIT[&quot;metre&quot;,1,AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],AXIS[&quot;X&quot;,EAST],AXIS[&quot;Y&quot;,NORTH],EXTENSION[&quot;PROJ4&quot;,&quot;+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs&quot;],AUTHORITY[&quot;EPSG&quot;,&quot;3857&quot;]]</LayerSRS>
<Field name="mvt_id" type="Integer64" src="mvt_id"/>
<Field name="id" type="Real" src="id"/>
<Field name="appellatio" type="String" src="appellatio"/>
</OGRVRTLayer>
</OGRVRTDataSource>
@palmerj
Copy link
Author

palmerj commented Feb 18, 2018

Here's the result of ogrinfo:

ogrinfo -so -al parcels.vrt
INFO: Open of `parcels.vrt'
      using driver `OGR_VRT' successful.
Metadata:
  bounds=174.1821636,-37.3637475,175.0829141,-36.6128647
  center=174.6325388,-36.9883061,0
  format=pbf
  maxzoom=14
  minzoom=0
  name=parcels
  scheme=tms
  type=overlay
  version=2
  ZOOM_LEVEL=14

Layer name: nz-primary-parcels
Geometry: Multi Polygon
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19426452.823749039 -4422292.935324477 at 19426452.823749039 -4422292.935324477
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19427723.465702284 -4416304.30882183 at 19427723.465702284 -4416304.30882183
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19437939.278741736 -4427263.133655861 at 19437939.278741736 -4427263.133655861
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19436159.932755705 -4419291.2347659143 at 19436159.932755705 -4419291.2347659143
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19438071.822630268 -4413077.076153581 at 19438071.822630268 -4413077.076153581
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19438553.163625158 -4412620.0682607023 at 19438553.163625158 -4412620.0682607023
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19438194.267890789 -4412904.915623921 at 19438194.267890789 -4412904.915623921
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19440493.589247882 -4392701.6535853194 at 19440493.589247882 -4392701.6535853194
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19442395.364560768 -4410215.8848554222 at 19442395.364560768 -4410215.8848554222
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19442512.708060224 -4410084.4713903014 at 19442512.708060224 -4410084.4713903014
ERROR 1: TopologyException: Input geom 0 is invalid: Ring Self-intersection at or near point 19445143.468657617 -4424834.4665149599 at 19445143.468657617 -4424834.4665149599
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19446585.88166159 -4427267.2681891397 at 19446585.88166159 -4427267.2681891397
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19446585.88166159 -4427267.2681891415 at 19446585.88166159 -4427267.2681891415
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19445852.899826385 -4407688.6856077434 at 19445852.899826385 -4407688.6856077434
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19445952.029097442 -4388107.0715882163 at 19445952.029097442 -4388107.0715882163
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19450423.531270243 -4420803.0243463079 at 19450423.531270243 -4420803.0243463079
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19450440.315852068 -4404579.2511836719 at 19450440.315852068 -4404579.2511836719
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19452724.343211442 -4416912.5239072451 at 19452724.343211442 -4416912.5239072451
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19452431.858737465 -4407617.0258937236 at 19452431.858737465 -4407617.0258937236
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19452369.1564877 -4407363.2310732482 at 19452369.1564877 -4407363.2310732482
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19450424.192416415 -4404566.7107337192 at 19450424.192416415 -4404566.7107337192
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19450548.379013781 -4388681.7652207082 at 19450548.379013781 -4388681.7652207082
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19454529.099701039 -4419852.9220621884 at 19454529.099701039 -4419852.9220621884
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19454709.053791802 -4419909.9532027757 at 19454709.053791802 -4419909.9532027757
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19454529.099701039 -4419852.9220621865 at 19454529.099701039 -4419852.9220621865
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19458207.432632502 -4422402.5315583916 at 19458207.432632502 -4422402.5315583916
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19465168.417441174 -4422740.0322235124 at 19465168.417441174 -4422740.0322235124
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19467217.638598803 -4431538.772093555 at 19467217.638598803 -4431538.772093555
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19465168.41744107 -4422740.0322234882 at 19465168.41744107 -4422740.0322234882
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19467039.117606226 -4419890.4674634747 at 19467039.117606226 -4419890.4674634747
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19467039.317858454 -4419890.6356753437 at 19467039.317858454 -4419890.6356753437
ERROR 1: TopologyException: Input geom 0 is invalid: Ring Self-intersection at or near point 19467943.79816509 -4432076.8749449831 at 19467943.79816509 -4432076.8749449831
ERROR 1: TopologyException: Input geom 0 is invalid: Self-intersection at or near point 19470805.200124964 -4458863.2593017453 at 19470805.200124964 -4458863.2593017453
Feature Count: 462045
Extent: (19389869.757223, -4489930.507309) - (19490140.844214, -4385281.622142)
Layer SRS WKT:
PROJCS["WGS 84 / Pseudo-Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["X",EAST],
    AXIS["Y",NORTH],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],
    AUTHORITY["EPSG","3857"]]
mvt_id: Integer64 (0.0)
id: Real (0.0)
appellatio: String (0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment