Comments (13)
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.
@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.
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.
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.
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.
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.
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.
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.
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.
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.
Actually, I found a later break with 2c0c3c1 (June 21 2013) which added the variant not checking for validity
from sfcgal.
Implementation specific comments can go to the PR I just filed: #85
from sfcgal.
This is completed. It took another signature to maintain C-API.
from sfcgal.
Related Issues (20)
- Bundled build HOT 2
- Replace auto_ptr by unique_ptr HOT 2
- Memory leak in extrude HOT 4
- PostGIS make error HOT 17
- unit-test & garden-test timeout with Boost 1.67 HOT 19
- Red warnings upon build of SFGCAL 1.3.6 HOT 1
- 1.3.6 build error on Fedora 30 (CGAL 4.14, gcc 9.0.1) HOT 19
- Undefined behaviour in CGAL when using difference3D HOT 2
- Crash under sfcgal_geometry_triangulate_2dz / SFCGAL::algorithm::isValid HOT 5
- "Geometry& operator= " is not implemented HOT 8
- CGAL 5.0 support HOT 6
- SFCGAL generates incorrect 3D intersection HOT 5
- Segfault on isValid HOT 6
- Installation creates both (prefix)/lib AND (prefix)/lib64 HOT 1
- Failing ApproximateMedialAxis and StraightSkeleton unit tests on Mac OS X HOT 2
- Broken libtoolize HOT 6
- Valid Solid shells cannot be converted to CGAL polyhedra HOT 16
- make is error HOT 4
- Could not find a configuration file for package "CGAL" on SFCGAL-1.3.7 HOT 2
- [IMPORTANT] Gitlab migration HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfcgal.