Subscribe to this thread
Home - General / All posts - Spline in 9
joebocop
484 post(s)
#19-Oct-21 20:18

Hey guys, do we have this functionality in 9?

https://georeference.org/doc/transform_spline.htm

I searched and landed on GeomSmooth which seems to do the opposite, and also GeomSegmentize, which doesn't seem to apply any algorithm when adding coords.

Thanks for any pointers.

Dimitri


6,852 post(s)
#20-Oct-21 05:36

No. "Smooth" is really a "simplify", as noted in the topic covering the reshape: smooth transform.

The spline transform is pretty, but splines are not a good fit to how the GIS industry has evolved. So you see less and less of them in GIS. In some cases, even processes that at the root use curvilinear segments, like Esri style traverses, don't even support them. Therefore, using splines tends to be a one-way move away from general purpose GIS and more into Illustrator land, in the sense that you permanently alter the original starting data into a form that is pinned to a particular coordinate system, and also without easy editing in downstream workflow (interactive spline editing is much more demanding of user skills).

9 tends to follow that industry trend, so while it supports splines it doesn't particularly encourage use of them like 8 did. I have mixed feelings about that. I like the visual look of splines and I think it would be nice for people who understand the upsides and downsides to be able to use them more widely if they wanted. But I also understand the chaos their use can cause in downstream workflow and interoperability, especially if you make it easy for an inexperienced operator to throw a million splines into a data set with a single click. Some GIS managers really hate software that provides such one-click functionality, like the 8 spline transform, for that reason.

A better way than the 8 spline transform could be something analogous, but which produced a similar visual effect by utilizing a sequence of small linear segments. You'd then have both the visual appeal as well as compatibility with mainstream GIS practice.

I'd also probably drop the ellipse arc construction, since that's very rarely encountered, and just leave it to circle arcs and spline arcs.

danb


1,853 post(s)
#20-Oct-21 06:57

I agree with everything you say Dimitri, but it is a shame in some ways as used carefully, splines were very useful for final cartographic presentation work. I don't think I ever used this functionality other than in a cartographic context, but I used it quite a bit over the years.


Landsystems Ltd ... Know your land | www.landsystems.co.nz

Dimitri


6,852 post(s)
#20-Oct-21 07:18

That's one of the things I like about 8, that it has a lot of features which are taken from the Photoshop/Illustrator world (love the gaussian blur for drop shadows...) that are great for visuals even if they depart from typical GIS practice. But hey, people do post-processing in Illustrator and tools like Avenza, so why not have that in the GIS as well? All those are in the future for 9, as it is better for raster effects and has more muscle for vector effects than 8.

danb


1,853 post(s)
#20-Oct-21 21:23

Good to hear. It might be useful to have something in the manual about the difference between 'Data' and (cartographic) 'Representation'.

Personally, I am very happy that Manifold is so data focused, but I also believe that both are part of the greater whole.

Such a topic might be a way to reinforce a concept for newer users and allow for such tools side by side in M9.

Support for multiple geoms in a table neatly provides a mechanism allowing both data and a cartographic representations to be maintained in the same table.

I guess within reason, your 'Representation' could be a dynamic computed geom depending upon what it entails.


Landsystems Ltd ... Know your land | www.landsystems.co.nz

Dimitri


6,852 post(s)
#21-Oct-21 09:34

Geoms can handle objects built using any of the allowed segment types, including arcs (curvilinear segments like circle, ellipse, or spline arcs). The reason arcs aren't so good for GIS users isn't that they can't be attached to data just like linear segments, because they can. The main reasons are:

1. Interoperability - Most GIS programs and vector formats can't handle, or have various limitations, on using arcs. Create a drawing that uses arcs and you limit your ability to interchange that drawing with other packages. There are no splines in shapefiles, for example.

2. Projections - A spline is defined by a mathematical formula based on the anchor points it uses. Those anchor points are just XY locations in whatever coordinate system is being used. But a spline that looks like you want in one coordinate system isn't going to look the same way if you simply transform the coordinates for the anchor points into the new coordinate system. Yes, you expect the spline to be visually different in the new coordinate system, but just transforming the anchor points using the formulae that are used to define coordinate system transformations doesn't get it right. There's a very big world of coordinate system transformations (NTv2, EPSG, etc) that are not a good fit to reshaping things like splines.

There are smaller reasons such as various epsilon considerations to decide when, for example, two splines or other curvilinear arcs intersect, etc.

But the upshot is that when you start using curvilinear segments, you tend to get away from the interoperability and re-projectability that people expect in GIS, and you also tend to get away from being able to use the algorithms that work with classic GIS linear segments for things like topology overlays and other spatial manipulations. There are ways of getting around that, for example, rewriting code to always interpolate splines and such into a sequence of very many linear segments, but then you're not really using or preserving splines.

lionel

834 post(s)
#20-Oct-21 22:58

I understand that a mapping software does not need tools like bezier curves ( geometry cad) but it allows to use Manifold in many areas. IT like Adobe Fireworks that support raster and Vector . People could buy manifold to only use the SQL editor ( should be enhance) or have a swiss knife tool to have acces to many vector/ raster / database file/Server !

All the transformations use until PAnel Transform ( SQL Frontend ) rather than menu find in photoshop or Illlustrator but i like the both way and programming is more easy with manifold !


union, doc , APIand most important deepl & keyboard shortcut

Sloots

549 post(s)
#21-Oct-21 14:30

For those who want to use a kind of spline function (like I do) see the attached map file.

With a little bit of C# lines and areas can be splined easily. The level parameter tells the function how deep the recursion proces should go. 3 is more than enough.

Have fun,

Chris

Attachments:
Spline.mxb


http://www.mppng.nl/manifold/pointlabeler

Mike Pelletier


1,947 post(s)
#21-Oct-21 15:25

Chris is the solution guy! Thanks for sharing that :-)

Splining is useful for maps, greeting cards, etc. Agree with Lionel about hoping Mfd can eventually become a Swiss Army knife like software.

danb


1,853 post(s)
#21-Oct-21 21:14

+1 to that. Great script Chris and thanks for sharing.

You have posted some neat examples for M9 and I am always pleasantly surprised how straightforward the code is once I see the examples. I wish I had the smarts to do this sort of stuff, but your examples are a great start


Landsystems Ltd ... Know your land | www.landsystems.co.nz

Dimitri


6,852 post(s)
#21-Oct-21 16:15

A very nice script, especially so since it gives spline-like effects but using a sequence of linear segments. Super!

danb


1,853 post(s)
#21-Oct-21 21:16

Is this spoked representation more palatable as something that could be added? I know ... suggestions are your friend


Landsystems Ltd ... Know your land | www.landsystems.co.nz

Dimitri


6,852 post(s)
#22-Oct-21 04:49

It's something I'd like to see added. In the meantime, Sloots' script could be made into an add-in.

joebocop
484 post(s)
#10-Nov-21 19:59

Can't believe how well this works, thank you so much.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.