Giter VIP home page Giter VIP logo

Comments (1)

nvkelso avatar nvkelso commented on May 14, 2024

Sometimes I want to preserve small islands by exaggerating them, basically
degrading a little bit, but inflating their shape so it is still just
larger than a dot at the new representative scale (say 6 - 12 vertices).
But most times I want to remove them completely.

I think the majority use case, though, is when a multipolygon shape
composed of many small areas, or a tiny country like Andora, still needs to
be represented when simplified else the DBF won't match with the SHP part;
and ideally the feature is still discernable. While that is useful, it's
just as useful to spin off a separate point shapefile for places like that
simplified out of representation so they can be visualized and be legible.

On Fri, Nov 22, 2013 at 3:00 PM, Matthew Bloch [email protected]:

Currently, the minimum complexity of a polygon ring is 3 unique vertices
(a triangle).

Tiny triangles aren't particularly desirable on a map. One solution would
be to let users specify a minimum of x unique vertices per shape (say, 4,
5, or 6). Island polygons could be removed after the vertex count falls
below x. The vertex count of non-removable rings would be prevented from
falling below x.

Then again, vertex count is a pretty crude way of determining if a shape
is too degenerate or too small to retain.

A better alternative might be to remove shapes whose dimensions are
smaller than a certain threshold relative to the intended output size of
your map. E.g. if you are making a map to display at 800 pixels wide,
islands smaller than, say, two pixels on their longest side could be
removed. Or you could use area: islands with areas less than 2 or 3 sq.
pixels could be removed.

This solution has its drawbacks too... we can weigh the alternatives if
people are interested in this feature.


Reply to this email directly or view it on GitHubhttps://github.com//issues/22
.

from mapshaper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.