i am generating vector tiles from mapnik-vector-tiles which is bundled by avecado.

i am in need of ocean polygon for the world.

Please refer http://gis.stackexchange.com/questions/120708/where-can-i-get-osm-water-polygon-for-lower-zoom-level

https://github.com/mapbox/mapnik-vector-tile/issues/70

and

https://github.com/MapQuest/avecado/issues/37

asked 12 Nov '14, 11:51

Arun%20kmp's gravatar image

Arun kmp
63141519
accept rate: 0%


Hi. If you are still interested in "ocean polygon" here is one option that can maybe help you. From your text I assume that you are interested in the Global Ocean area (everything blue, outside the continents) or maybe in the Planet-sea (as the inverse of the Planet-land areas created from the coastline dataset). The Planet-sea in 11 scale levels you may download (shp format) from here
https://drive.google.com/file/d/0B6qGm3k2qWHqYVl1NUFRVFQtMEk/view?usp=sharing
with a log file suggesting how and when to switch between these levels when doing continuous scaling. If you want only the Global Ocean, just take/extract the largest area object (the first one) from the level files. From my side, you may use these data as you like but in accordance with the OSM licencing rules. The data is from some weeks ago created from the OSM Planet dump. The procedure when and how to create these scale levels is complex and complicated. Yet here are some notes and suggestions (maybe unnecessary).
1.The vector scale levels are created under quite different criteria compared to the usual raster zoom levels. The scale levels provide continuous scaling, with roughly the same amount of data to transmit for any scale factor where the objects spontaneously appear and disappear when zooming in and out.
2.Any data generalisation model (i.e. used here as well) inevitable creates self-crossings and very small areas between such points. If your area rendering algorithm requires simple closed border lines, please try to avoid the usual area splitting up model. This may result in ugly fragmentation. Consider exchanging the poly-line segments between the neighbouring self-crossings and reverse them. In this way self-crossings become just touching points.
3.When tiling sea scale levels I suggest to use uniform square tiles. But please be aware that for a moderate/small tile size for some of the scale levels you may end up with a huge number (hundreds of millions) of tiles. Consider generating only none-trivial tiles (those containing at least one border point) and automatic regeneration of the trivial (pure blue) tiles.

permanent link

answered 13 Nov '14, 20:14

sanser's gravatar image

sanser
665333453
accept rate: 5%

Maybe from OpenStreetMap Data ?

They have special OSM based shapefiles for coastlines etc.

permanent link

answered 13 Nov '14, 16:56

stephan75's gravatar image

stephan75
12.5k453209
accept rate: 6%

Thanks for your @stephan and @sanser. i tried OpenStreetMap Data, its size is 377MB it fits for zoom level above 8 or 9. But what about the scenario for zoom level from 0 to 8. simply if i use openstreetmap Data in zoom level 0 it will take more size in creating vector tiles. so i go with Natural Earth data.

Test Case for Using Natural Earth data.

1) Initially i used shape file directly. it didnt show any error at the same time it didnt show proper result so i checked the pbf file. In geometry same values repeating again and again please see https://github.com/mapbox/mapnik-vector-tile/issues/70. so it fails.

2) i convert the shape file to postgis and import the geometry from postgis again i got same output.

3) Later i checked the geometry projection. In new natural_earth table i found geometry is normal latitude and longitude but in planet_osm_node table it is transformed lat long.

so i prefer to change the lat long. this is my new query

select ST_AsText(ST_Transform(geom, 900913)) from ne_110m_ocean

it works fine except poles. yes, st_transform show

error in poles is ERROR: transform: couldn't project point (-180 90 0): tolerance condition error (-20)

Error here is due to poles. srid 900913 did not accept 90. so in geometry instead of 90 change to 89.9999999. then transform the srid to 900913 select ST_AsText(ST_Transform(geom, 900913)) from ne_110m_ocean

it works fine and correct vector tiles also generated.

permanent link

answered 15 Nov '14, 13:12

Arun%20kmp's gravatar image

Arun kmp
63141519
accept rate: 0%

edited 15 Nov '14, 13:14

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×309
×217
×37
×34
×6

question asked: 12 Nov '14, 11:51

question was seen: 3,839 times

last updated: 15 Nov '14, 13:14

powered by OSQA