Code Monkey home page Code Monkey logo

Comments (13)

Remi-C avatar Remi-C commented on July 17, 2024

It would be super cool tout have an option to output not only the lines of
the sskeleton,
but also fort each line its connectivity degree regarding the boundary.
For instance touching boundary are 0 lines.
Touching 0 lines are lines 1, etc.

You could do what you want, but with much more flexibility
Cheers
Remic
Le 10 juin 2015 09:44, "Sandro Santilli" [email protected] a
écrit :

Would a patch adding a parameter to omit lines that touch the input
polygon boundary from StraightSkeleton output be accepted ? It'd be aimed
at providing an approximate "MedialAxis" implementation.


Reply to this email directly or view it on GitHub
#76.

from sfcgal.

vmora avatar vmora commented on July 17, 2024

@strk Where do you want to put the parameter, in the C API ?

I'd rather go for an additional function, approximateMedialAxis sounds like a nice name.

from sfcgal.

vmora avatar vmora commented on July 17, 2024

Remi-C I think the output format for this info is a bit tricky (an M coord ??). Outputting a graph would be nice... but it(s not in SFS, is it ?

@strk If I understand http://doc.cgal.org/latest/Straight_skeleton_2/index.html correctly, filtering out edges that are less than N edges from the border shouldn't cost anything but adding a counter to straightSkeletonToMultiLineString and ressetting it on it->is_bisector(). Not sure about the duplicate filtering in this case though.

from sfcgal.

Remi-C avatar Remi-C commented on July 17, 2024

Tricky?
you can either put it in M, or also output an array of int that relates to
each line, without creating a custom type.

Nothing to complicated I would think.

About graph, of course I could build such a graph and compute myself the
information, but why spend computing time for something we may already
easily have.

Only removing line touching boundary is not going to give a valid median
axis in many common situation, thus if you want the function to be of any
use with real world data, some more information would be nice.

Cheers,
Rémi-C

2015-06-10 18:29 GMT+02:00 Vincent Mora [email protected]:

Remi-C I think the output format for this info is a bit tricky (an M coord
??). Outputting a graph would be nice... but it(s not in SFS, is it ?

@strk https://github.com/strk If I understand
http://doc.cgal.org/latest/Straight_skeleton_2/index.html correctly,
filtering out edges that are less than N edges from the border shouldn't
cost anything but adding a counter to straightSkeletonToMultiLineString and
ressetting it on it->is_bisector(). Not sure about the duplicate filtering
in this case though.


Reply to this email directly or view it on GitHub
#76 (comment).

from sfcgal.

vmora avatar vmora commented on July 17, 2024

Remi-C, I find "tricky" to choose the right (most usable) output format among what you propose and others: It could be, e.g. an array of multilinestrings, where the index is the distance from the boundary, a geometrycollection of multylinestrings would do the trick too.

Do you have a preference for one of those ?

When I was mentioning a graph, I was not thinking about recomputing it, but actually having the straigthSkeleton output the graph it has internally instead of converting it to multilinestring. The problem beeing, again, to define the output type.

from sfcgal.

Remi-C avatar Remi-C commented on July 17, 2024

Hmm I realy like the geom collection, because if you don't care about the
order, you simply use st_collectionextract.

Graph might be difficult to output. Maybe with topogeomjson, in a second
time.
Cheers
Remic
Le 10 juin 2015 18:57, "Vincent Mora" [email protected] a écrit :

Remi-C, I find "tricky" to choose the right (most usable) output format
among what you propose and others: It could be, e.g. an array of
multilinestrings, where the index is the distance from the boundary, a
geometrycollection of multylinestrings would do the trick too.

Do you have a preference for one of those ?

When I was mentioning a graph, I was not thinking about recomputing it,
but actually having the straigthSkeleton output the graph it has internally
instead of converting it to multilinestring. The problem beeing, again, to
define the output type.


Reply to this email directly or view it on GitHub
#76 (comment).

from sfcgal.

mhugo avatar mhugo commented on July 17, 2024

When we are at extending the straight skeleton, I think the issue #35 is related. With a Z or M dimension to represent the "time" of each vertex, it would be very useful for generation of building roofs.
About the output format : the geometry collection ordered by logical distance to the boundary seems nice. Do you see any problem with it ?

from sfcgal.

Remi-C avatar Remi-C commented on July 17, 2024

For me : perfect.
Cheers
Remi c
Le 11 juin 2015 14:48, "Hugo Mercier" [email protected] a écrit :

When we are at extending the straight skeleton, I think the issue #35
#35 is related. With a Z or M
dimension to represent the "time" of each vertex, it would be very useful
for generation of building roofs.
About the output format : the geometry collection ordered by logical
distance to the boundary seems nice. Do you see any problem with it ?


Reply to this email directly or view it on GitHub
#76 (comment).

from sfcgal.

strk avatar strk commented on July 17, 2024

I'm working on approximateMedialAxis. Question: is it acceptable to modify the ABI of the C++ interface ?
I'm thinking about adding an "innerOnly" parameter to the straightSkeleton, defaulting to false.

from sfcgal.

strk avatar strk commented on July 17, 2024

For reference, last time that ABI was touched was with 8cedb44 in April 23 2013, commit which mentions a reference of #161 that cannot be a github issue.. do you know what it is ?

from sfcgal.

strk avatar strk commented on July 17, 2024

Actually, I found a later break with 2c0c3c1 (June 21 2013) which added the variant not checking for validity

from sfcgal.

strk avatar strk commented on July 17, 2024

Implementation specific comments can go to the PR I just filed: #85

from sfcgal.

strk avatar strk commented on July 17, 2024

This is completed. It took another signature to maintain C-API.

from sfcgal.

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.