<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 18/03/2011 22:56, Kev js1982 wrote:
    <blockquote
      cite="mid:AANLkTi=Ma+a4UWav7VjYkJAtdBWan7K_8oO1NU=A8aao@mail.gmail.com"
      type="cite">Resurrecting an old thread I know but with the NSPD
      Open data also being available allowing Northern Ireland to be
      generated and having access to an otherwise idle 64bit server I've
      taken the opportunity to revisit this, and have successfully
      created the shapefiles (it only took the server 12 days to
      generate the blighters - it managed to generate Z16 tiles for the
      whole of Europe and Z18 for the British Isles in just 36 hours -
      meh!) but now have one more obstacle to overcome...<br>
      <br>
      The Veroni thingy obviously generates the tiles so they butt up
      against one another which works perfectly here in the landlocked
      East Midlands, but goes somewhat wrong in coastal areas (Fig 1).<br>
      <br>
      My thought here is that the "World Boundaries" shape file can be
      used to trim the coastal boundaries to be locked to land so that
      the map looks "nice" (i.e. postcodes don't end up in the sea save
      for a little overlap on beaches) - Indeed if you add the World
      Boundaries file to Quantum GIS and use the "Clip Tool" you end up
      with what visually looks correct ( Fig. 3) but if you then hide
      the World Boundaries file the problem becomes obvious (Fig 2.)  <br>
      <br>
      What I want to know, is it possible to trim the postcode shapes so
      that nothing outside another set of shapes (i.e. the British Isles
      landmass) is included, but instead of leaving gaps the postcode
      shapes (e.g. FY3 1) are adjusted so that the line runs along the
      coast line?  i.e. I would be left with something visually the same
      as Fig. 3 but with the coastlines part of the NNXX-X shapefile
      layer, and more specifically the correct polygon (e.g. the FY3 1
      polygon).<br>
      <br>
      Kev<br>
      <br>
      <br>
      Fig 1 - Postcode areas in south west Lancashire and the north
      Wales coast (green = NNXX-X shapefile, blackline and dotted area
      uses the worldboundaries file)<br>
      <a moz-do-not-send="true"
        href="http://kjs.me.uk/3rdparty/osm/SouthWestLancs-NNXX-X.png">http://kjs.me.uk/3rdparty/osm/SouthWestLancs-NNXX-X.png</a><br>
      <br>
      Fig 2 - After using Quantum GIS's "Clip" tool - <a
        moz-do-not-send="true"
        href="http://kjs.me.uk/3rdparty/osm/SouthWestLancs-NNXX-X_trimmed.png">http://kjs.me.uk/3rdparty/osm/SouthWestLancs-NNXX-X_trimmed.png</a><br>
      <br>
      Fig 3 - After adding the "World Boundaries" back on. -
      SouthWestLancs-NNXX-X_trimmed_withwb.png<br>
      <br>
      <i>Open Street Map data licenced under the <a
          moz-do-not-send="true"
          href="http://creativecommons.org/licenses/by-sa/2.0/">Creative
          Commons Attribution-Share Alike 2.0 license</a> by the <a
          moz-do-not-send="true" href="http://openstreetmap.org/">OpenStreetMap</a></i>
      project and its contributors. <i>Maps contain <a
          moz-do-not-send="true"
          href="http://www.ordnancesurvey.co.uk/oswebsite/opendata/">Ordnance
          Survey OpenData</a> © Crown copyright and database right 2010.</i>
      <i>Postcode data in Great Britain is provided by Code-Point Open
        which contains Royal Mail data © Royal Mail copyright and
        database right 2010.</i> <i>Postcode data in Northern Ireland
        is from the <a moz-do-not-send="true"
href="http://www.ons.gov.uk/about-statistics/geography/products/geog-products-postcode/nspd/">NSPD
          Open</a> which contains National Statistics data © Crown
        copyright and database right 2010. </i><br>
      <br>
      <div class="gmail_quote">On Fri, Apr 30, 2010 at 12:30, Kev js1982
        <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:osm@kevswindells.eu">osm@kevswindells.eu</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          Hi Dave,<br>
          <br>
          Thanks for providing the shapefiles for download - they did
          the job nicely.<br>
          <br>
          One thing I have noticed (which also afflicts <a
            moz-do-not-send="true"
            href="http://random.dev.openstreetmap.org" target="_blank">random.dev.openstreetmap.org</a>)
          is that a few postcode area/districts are missing - namely<br>
          <br>
          FY2 - (North Shore) Blackpool, Lancs<br>
          PE11 - Spalding, Lincs<br>
          PL17 - Callington, Cornwall<br>
          <br>
          Using the code point download (which I got via the MySociety
          mirror) shows that these postcodes do exist.<br>
          <br>
          Also one of the AB ones (12 or 21 IIRC) for some reason
          includes parts of Éire, Spain, Portugal and atlantic; while HS
          includes Reykjavik<br>
          <br>
          Just thought you'd like to know there is a possible error with
          the conversion process.<br>
          <br>
          Nice work though - been after a postcode map for a while, and
          to go from an A5 diagram to full "google maps" goodness in one
          swoop is awesome!<br>
          <br>
          Regards<br>
          <br>
          Kev Swindells.
          <div>
            <div class="h5">
              <br>
              <br>
              <div class="gmail_quote">
                On Mon, Apr 26, 2010 at 5:29 PM, Dave Stubbs <span
                  dir="ltr"><<a moz-do-not-send="true"
                    href="mailto:dave@randomjunk.co.uk" target="_blank">dave@randomjunk.co.uk</a>></span>
                wrote:<br>
                <blockquote class="gmail_quote" style="margin: 0pt 0pt
                  0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
                  padding-left: 1ex;">
                  <div>
                    <div>On Mon, Apr 26, 2010 at 5:15 PM, Kev js1982
                      <<a moz-do-not-send="true"
                        href="mailto:osm@kevswindells.eu"
                        target="_blank">osm@kevswindells.eu</a>>
                      wrote:<br>
                      > On Mon, Apr 26, 2010 at 5:00 PM, Kev js1982
                      <<a moz-do-not-send="true"
                        href="mailto:osm@kevswindells.eu"
                        target="_blank">osm@kevswindells.eu</a>>
                      wrote:<br>
                      >><br>
                      >> Thanks for that Dave - really useful.<br>
                      >><br>
                      >> One question though - which prj
                      string/file do I need for these?<br>
                      >><br>
                      ><br>
                      > Answering my own question - looks to be
                      Google Mercator.<br>
                      ><br>
                      > <a moz-do-not-send="true"
                        href="http://spatialreference.org/ref/sr-org/6627/"
                        target="_blank">http://spatialreference.org/ref/sr-org/6627/</a><br>
                      ><br>
                      > Kev Swindells<br>
                      ><br>
                      ><br>
                      <br>
                    </div>
                  </div>
                  Actually, for some obscure historical reason it's
                  projected into<br>
                  "+proj=merc" which is srs 3395.<br>
                  <br>
                  Close to 900913, but not quite the same -- my mapnik
                  stylesheet is<br>
                  then set to reproject to google mercator for the tile
                  generation.<br>
                  <font color="#888888"><br>
                    Dave<br>
                  </font></blockquote>
              </div>
              <br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Talk-GB mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Talk-GB@openstreetmap.org">Talk-GB@openstreetmap.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstreetmap.org/listinfo/talk-gb">http://lists.openstreetmap.org/listinfo/talk-gb</a>
</pre>
    </blockquote>
    You ought to be able to do this with Intersect first which will
    divide your FY3 1 polygon into two along the coastline & then
    clip the result to only get the ones inside the coastline. At least
    if I understand the problem correctly.<br>
    <br>
    I've never got the packaged Voronoi working so have only played with
    Delauney triangulation doing the same process.<br>
    <br>
    Jerry<br>
  </body>
</html>