<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Linear trend has to pass through the origin in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/linear-trend-has-to-pass-through-the-origin/m-p/235409#M18288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can force a linear regression to pass through the origin of coordinates. The best way I have found so far it is to convert the raster to a numpy array, move the coordinate system so my origin of coordinates is the point I want to pass through, create a least square model using numpy.linalg.lstsq where Z = aX + bY + c and c = 0, and then use the model to create the raster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll let you know if it works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Aug 2012 19:55:43 GMT</pubDate>
    <dc:creator>JoseLuis_Serrano</dc:creator>
    <dc:date>2012-08-15T19:55:43Z</dc:date>
    <item>
      <title>Linear trend has to pass through the origin</title>
      <link>https://community.esri.com/t5/python-questions/linear-trend-has-to-pass-through-the-origin/m-p/235407#M18286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi - I need to interpolate a linear trend surface through a really big number of points but with the condition that the surface has to pass exactly through one of them, like the origin point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I couldn't find any option for that in the trend tool so I though about creating a lot of points really close to the origin point to force the trend but since I already have so many points I get an out of memory error. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does someone know if there is another way of doing this? I am using python to perform this analysis so I though about converting the points to a numpy array but so far I haven't found anything in numpy to calculate the trend.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jose Luis Serrano&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Programmer/Analyst&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 17:44:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/linear-trend-has-to-pass-through-the-origin/m-p/235407#M18286</guid>
      <dc:creator>JoseLuis_Serrano</dc:creator>
      <dc:date>2012-08-14T17:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Linear trend has to pass through the origin</title>
      <link>https://community.esri.com/t5/python-questions/linear-trend-has-to-pass-through-the-origin/m-p/235408#M18287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think that almost by definition a trend surface is never going to pass through your data points because it uses a least-squares regression to accomplish this, so a different interpolation method might be needed if this is a requirement - for instance the spline techniques force your interpolated surface through the original data points.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 11:08:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/linear-trend-has-to-pass-through-the-origin/m-p/235408#M18287</guid>
      <dc:creator>ChristopherThompson</dc:creator>
      <dc:date>2012-08-15T11:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Linear trend has to pass through the origin</title>
      <link>https://community.esri.com/t5/python-questions/linear-trend-has-to-pass-through-the-origin/m-p/235409#M18288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can force a linear regression to pass through the origin of coordinates. The best way I have found so far it is to convert the raster to a numpy array, move the coordinate system so my origin of coordinates is the point I want to pass through, create a least square model using numpy.linalg.lstsq where Z = aX + bY + c and c = 0, and then use the model to create the raster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll let you know if it works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 19:55:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/linear-trend-has-to-pass-through-the-origin/m-p/235409#M18288</guid>
      <dc:creator>JoseLuis_Serrano</dc:creator>
      <dc:date>2012-08-15T19:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Linear trend has to pass through the origin</title>
      <link>https://community.esri.com/t5/python-questions/linear-trend-has-to-pass-through-the-origin/m-p/235410#M18289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please do, the math side of this certainly isn't my strong point so I'll be interested to see the results and what you accomplish.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 10:20:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/linear-trend-has-to-pass-through-the-origin/m-p/235410#M18289</guid>
      <dc:creator>ChristopherThompson</dc:creator>
      <dc:date>2012-08-16T10:20:35Z</dc:date>
    </item>
  </channel>
</rss>

