{"id":3786,"date":"2025-06-28T13:03:47","date_gmt":"2025-06-28T13:03:47","guid":{"rendered":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/best-fit-polyline\/"},"modified":"2025-10-15T11:10:14","modified_gmt":"2025-10-15T11:10:14","slug":"bestfit","status":"publish","type":"docs","link":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/","title":{"rendered":"Best Fit Polyline"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Overview<\/strong>&nbsp;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">The <strong>Best Fit Polyline<\/strong> tool is used to generate a smooth polyline that <strong>mathematically approximates a trend<\/strong> through a given set of points. Using polynomial regression, the tool calculates a curve that minimizes the overall deviation from selected points\u2014creating a &#8220;best fit&#8221; path through scattered data.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">This is especially useful in engineering and surveying, where field data is noisy or uneven, but an analytical trend line is needed for modeling terrain profiles, road alignments, or channel sections.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Utility<\/strong>&nbsp;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the <strong>Best Fit Polyline<\/strong> tool for:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Survey data smoothing<\/strong> (e.g., from GPS or Total Station)&nbsp;<\/li>\n\n\n\n<li>Centerline estimation for rivers, pipelines, or road axes<\/li>\n\n\n\n<li><strong>As well as<\/strong> trend analysis across scattered point data<\/li>\n\n\n\n<li><strong>In addition to<\/strong> cross-section profiling<\/li>\n\n\n\n<li><strong>And<\/strong> generating design-ready geometries from raw survey input<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"246\" height=\"197\" src=\"https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2025\/06\/image-14.png\" alt=\"\" class=\"wp-image-3825\" style=\"width:400px\"\/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">&nbsp;<strong>Workflow<\/strong>&nbsp;<\/h2>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Launch the Command<\/strong>: Start the <strong>Best Fit Polyline <\/strong>command from the SPCAD Ribbon or type the command <strong>BESTFITLINE_SP<\/strong> in the command line.&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Select Points<\/strong>&nbsp;<br>Click to select multiple <strong>Point objects<\/strong> from the drawing (e.g., red circles in the image).&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Enter Polynomial Order<\/strong>&nbsp;<br>Prompt will appear:&nbsp;\n<ul class=\"wp-block-list\">\n<li>Enter order of Polynomial &lt;1&gt;:&nbsp;<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\"><strong>Options:&nbsp;<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Linear (straight line)&nbsp;<\/li>\n\n\n\n<li>Quadratic (parabola)&nbsp;<\/li>\n\n\n\n<li>Cubic&nbsp;<\/li>\n\n\n\n<li>Quartic&nbsp;<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4. Polyline Creation<\/strong>&nbsp;<br>A polyline is drawn that best fits the selected points based on the specified polynomial regression.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"776\" height=\"723\" src=\"https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2025\/06\/bestfit.png\" alt=\"\" class=\"wp-image-3827\" style=\"width:600px\" srcset=\"https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2025\/06\/bestfit.png 776w, https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2025\/06\/bestfit-300x280.png 300w, https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2025\/06\/bestfit-768x716.png 768w\" sizes=\"(max-width: 776px) 100vw, 776px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading has-text-align-left has-medium-font-size\"><br><strong>Tips<\/strong>&nbsp;<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use ORDER = 1 for quick linear trends.&nbsp;<\/li>\n\n\n\n<li>Use higher orders (2\u20134) for curved or organic shapes.&nbsp;<\/li>\n\n\n\n<li>Keep order low when working with noisy or sparse data to avoid overfitting.&nbsp;<\/li>\n\n\n\n<li>Ensure points are approximately aligned in X (or Y) to avoid distortions.&nbsp;<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Best Fit Polyline: Linear to Quartic using SPCAD v25.1\" width=\"720\" height=\"405\" src=\"https:\/\/www.youtube.com\/embed\/24Q3SZfTDME?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"featured_media":0,"parent":1452,"menu_order":15,"comment_status":"open","ping_status":"closed","template":"","meta":{"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"doc_tag":[],"class_list":["post-3786","docs","type-docs","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Best Fit Polyline Tool in SPCAD | Smooth Curve from Survey Points<\/title>\n<meta name=\"description\" content=\"Fit smooth curves through survey points with SPCAD\u2019s Best Fit Polyline tool using polynomial regression. Perfect for terrain and alignment modeling.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Best Fit Polyline Tool in SPCAD | Smooth Curve from Survey Points\" \/>\n<meta property=\"og:description\" content=\"Fit smooth curves through survey points with SPCAD\u2019s Best Fit Polyline tool using polynomial regression. Perfect for terrain and alignment modeling.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/\" \/>\n<meta property=\"og:site_name\" content=\"SPCAD HELP\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/profile.php?id=100088033569557\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-15T11:10:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2025\/06\/image-14.png\" \/>\n\t<meta property=\"og:image:width\" content=\"246\" \/>\n\t<meta property=\"og:image:height\" content=\"197\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/docs\\\/spcadhelp\\\/geometry\\\/bestfit\\\/\",\"url\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/docs\\\/spcadhelp\\\/geometry\\\/bestfit\\\/\",\"name\":\"Best Fit Polyline Tool in SPCAD | Smooth Curve from Survey Points\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/docs\\\/spcadhelp\\\/geometry\\\/bestfit\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/docs\\\/spcadhelp\\\/geometry\\\/bestfit\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image-14.png\",\"datePublished\":\"2025-06-28T13:03:47+00:00\",\"dateModified\":\"2025-10-15T11:10:14+00:00\",\"description\":\"Fit smooth curves through survey points with SPCAD\u2019s Best Fit Polyline tool using polynomial regression. Perfect for terrain and alignment modeling.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/docs\\\/spcadhelp\\\/geometry\\\/bestfit\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/docs\\\/spcadhelp\\\/geometry\\\/bestfit\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/docs\\\/spcadhelp\\\/geometry\\\/bestfit\\\/#primaryimage\",\"url\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image-14.png\",\"contentUrl\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image-14.png\",\"width\":246,\"height\":197},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/docs\\\/spcadhelp\\\/geometry\\\/bestfit\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SPCAD HELP\",\"item\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/docs\\\/spcadhelp\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Geometry\",\"item\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/docs\\\/spcadhelp\\\/geometry\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Best Fit Polyline\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/#website\",\"url\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/\",\"name\":\"SPCAD HELP\",\"description\":\"SPCAD Help Documentation\",\"publisher\":{\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/#organization\",\"name\":\"SPCAD HELP\",\"url\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/intro-logo.png\",\"contentUrl\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/intro-logo.png\",\"width\":1581,\"height\":877,\"caption\":\"SPCAD HELP\"},\"image\":{\"@id\":\"https:\\\/\\\/help.cadomation.com\\\/spcad\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/profile.php?id=100088033569557\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/cadomation\\\/posts\\\/?feedView=all\",\"https:\\\/\\\/www.youtube.com\\\/@cadomation\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Best Fit Polyline Tool in SPCAD | Smooth Curve from Survey Points","description":"Fit smooth curves through survey points with SPCAD\u2019s Best Fit Polyline tool using polynomial regression. Perfect for terrain and alignment modeling.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/","og_locale":"en_US","og_type":"article","og_title":"Best Fit Polyline Tool in SPCAD | Smooth Curve from Survey Points","og_description":"Fit smooth curves through survey points with SPCAD\u2019s Best Fit Polyline tool using polynomial regression. Perfect for terrain and alignment modeling.","og_url":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/","og_site_name":"SPCAD HELP","article_publisher":"https:\/\/www.facebook.com\/profile.php?id=100088033569557","article_modified_time":"2025-10-15T11:10:14+00:00","og_image":[{"width":246,"height":197,"url":"https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2025\/06\/image-14.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/","url":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/","name":"Best Fit Polyline Tool in SPCAD | Smooth Curve from Survey Points","isPartOf":{"@id":"https:\/\/help.cadomation.com\/spcad\/#website"},"primaryImageOfPage":{"@id":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/#primaryimage"},"image":{"@id":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/#primaryimage"},"thumbnailUrl":"https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2025\/06\/image-14.png","datePublished":"2025-06-28T13:03:47+00:00","dateModified":"2025-10-15T11:10:14+00:00","description":"Fit smooth curves through survey points with SPCAD\u2019s Best Fit Polyline tool using polynomial regression. Perfect for terrain and alignment modeling.","breadcrumb":{"@id":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/#primaryimage","url":"https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2025\/06\/image-14.png","contentUrl":"https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2025\/06\/image-14.png","width":246,"height":197},{"@type":"BreadcrumbList","@id":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/bestfit\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/help.cadomation.com\/spcad\/"},{"@type":"ListItem","position":2,"name":"SPCAD HELP","item":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/"},{"@type":"ListItem","position":3,"name":"Geometry","item":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/"},{"@type":"ListItem","position":4,"name":"Best Fit Polyline"}]},{"@type":"WebSite","@id":"https:\/\/help.cadomation.com\/spcad\/#website","url":"https:\/\/help.cadomation.com\/spcad\/","name":"SPCAD HELP","description":"SPCAD Help Documentation","publisher":{"@id":"https:\/\/help.cadomation.com\/spcad\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/help.cadomation.com\/spcad\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/help.cadomation.com\/spcad\/#organization","name":"SPCAD HELP","url":"https:\/\/help.cadomation.com\/spcad\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/help.cadomation.com\/spcad\/#\/schema\/logo\/image\/","url":"https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2024\/02\/intro-logo.png","contentUrl":"https:\/\/help.cadomation.com\/spcad\/wp-content\/uploads\/2024\/02\/intro-logo.png","width":1581,"height":877,"caption":"SPCAD HELP"},"image":{"@id":"https:\/\/help.cadomation.com\/spcad\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/profile.php?id=100088033569557","https:\/\/www.linkedin.com\/company\/cadomation\/posts\/?feedView=all","https:\/\/www.youtube.com\/@cadomation"]}]}},"comment_count":0,"_links":{"self":[{"href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/docs\/3786","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/comments?post=3786"}],"version-history":[{"count":7,"href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/docs\/3786\/revisions"}],"predecessor-version":[{"id":4812,"href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/docs\/3786\/revisions\/4812"}],"up":[{"embeddable":true,"href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/docs\/1452"}],"next":[{"title":"Straighten The Polyline","link":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/strpl\/","href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/docs\/3788"}],"prev":[{"title":"DogBone","link":"https:\/\/help.cadomation.com\/spcad\/docs\/spcadhelp\/geometry\/dbone\/","href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/docs\/3784"}],"wp:attachment":[{"href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/media?parent=3786"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/help.cadomation.com\/spcad\/wp-json\/wp\/v2\/doc_tag?post=3786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}