[postgis-tickets] [PostGIS] #3712: Address MVT issues reported by specification author

PostGIS trac at osgeo.org
Tue Feb 21 13:30:07 PST 2017


#3712: Address MVT issues reported by specification author
----------------------+----------------------------
  Reporter:  strk     |      Owner:  Björn Harrtell
      Type:  defect   |     Status:  new
  Priority:  blocker  |  Milestone:  PostGIS 2.4.0
 Component:  postgis  |    Version:  trunk
Resolution:           |   Keywords:
----------------------+----------------------------

Comment (by flippmoke):

 @nicklas:

 >If I understand things right, the problem is in validness that turns up
 fro simplification and scaling.

 Yes, but the original data is often invalid to begin with. This is why I
 currently do the following steps:

 Simplification => Scaling => Clipping => Make Valid

 In order to speed up processing, I have found that for more then one tile,
 Simplification and Scaling can be done once for a shape for an entire zoom
 level, and you can create multiple tiles from that data. This is not ideal
 for many situations though where you just want to create one.

 We have found douglas-peuker to be best at actually preserving the
 original shape, but your ideas sound interesting but also adding a lot
 more complexity, will think about it more.

 -------

 @Björn Harrtell

 I have thought about all of this problem probably more then I should as
 far as the validity and I have found that snap rounding is very important
 in some ways to prevent intersections in odd ways. The only way I was able
 to solve this was through creating https://github.com/mapbox/wagyu/. In
 short it is Snap Rounding + Vatti + Additional Correction and by testing
 it repeatedly with a fuzzer, I was able to make it produce OGC valid
 polygon output 100% of the time -- no matter the input. It is reasonably
 fast (considering all it does). If anyone here ever wants a walk through
 of the algorithm and code -- I would love to do it.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3712#comment:16>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list