<div dir="ltr">Hi Marcus,<div><br></div><div>Thanks again for your patience with this issue. It seems that whatever i set in the memory of 'i.segment' to it throws up the same 'G_malloc' error with the same 3 gb shortfall. I had another idea which is to make a smaller subset image (but if i do this) will the new subset of 'id' segments be applicable if applied to the entire image. For example if a value of '5134' represents 'peat' could i use 'r.mapcalc' to query the entire image for those values of '5134'. Supervised and Unsupervised Classification would not yield the differences in the landscape i'm looking for which 'i.segment' succeeds.</div><div><br></div><div>Thanks,</div><div><br></div><div>Paul Shapley</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 21 June 2018 at 08:52, Markus Metz <span dir="ltr"><<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">[please keep it in the list]<br><br>On Thu, Jun 21, 2018 at 9:12 AM, Paul Shapley <<a href="mailto:p.shapley@gmail.com" target="_blank">p.shapley@gmail.com</a>> wrote:<br>><br>> Thank you Markus...here are the results of g.region -p and <a href="http://r.info" target="_blank">r.info</a><br>><br>> g.region -p                                                                     <br>> projection: 99 (OSGB 1936 / British National Grid)<br>> zone:       0<br>> datum:      osgb36<br>> ellipsoid:  airy<br>> north:      242815<br>> south:      200862.25<br>> west:       263134.25<br>> east:       298833.75<br>> nsres:      0.25<br>> ewres:      0.25<br>> rows:       167811<br>> cols:       142798<br>> cells:      23963075178<br>> (Thu Jun 21 08:03:51 2018) Command finished (0 sec)<br>><br>> (Thu Jun 21 08:08:02 2018)                                                      <br>> <a href="http://r.info" target="_blank">r.info</a> map=APGB_aerial_1.1@PERMANENT                                            <br>>  +----------------------------<wbr>------------------------------<wbr>------------------+<br>>  | Map:      APGB_aerial_1.1@PERMANENT      Date: Tue May 29 09:11:31 2018    |<br>>  | Mapset:   PERMANENT                      Login of Creator: administrator   |<br>>  | Location: TempLocation                                                     |<br>>  | DataBase: C:\                                                              |<br>>  | Title:    APGB_aerial_1.1                                                  |<br>>  | Timestamp: none                                                            |<br>>  |----------------------------<wbr>------------------------------<wbr>------------------|<br>>  |                                                                            |<br>>  |   Type of Map:  raster               Number of Categories: 0               |<br>>  |   Data Type:    CELL                                                       |<br>>  |   Rows:         167811                                                     |<br>>  |   Columns:      142798                                                     |<br>>  |   Total Cells:  23963075178                                                |<br>>  |        Projection: OSGB 1936 / British National Grid                       |<br>>  |            N:     242815    S:  200862.25   Res:  0.25                     |<br>>  |            E:  298833.75    W:  263134.25   Res:  0.25                     |<br>>  |   Range of data:    min = 0  max = 255                                     |<br>>  |                                                                            |<br>>  |   Data Description:                                                        |<br>>  |    generated by r.in.gdal                                                  |<br>>  |                                                                            |<br>>  |   Comments:                                                                |<br>>  |    r.in.gdal -o -k input="J:\Spatial Data\Aerial\APGB_received_<wbr>20180416\   |<br>>  |    \source\RGB_25cm\output\test\<wbr>JPEG.png" output="APGB_aerial_1" memory\   |<br>>  |    =300 offset=0 num_digits=0                                              |<br>>  |                                                                            |<br>>  +----------------------------<wbr>------------------------------<wbr>------------------+<br>> (Thu Jun 21 08:08:02 2018) Command finished (0 sec) <br><div><br></div><div>OK, so you really have a group of rasters with 24 billion cells. Still, do you really need to run i.segment on the full extents with such a high resolution? If yes, try i.segment with memory=25000. Even if the system has more RAM, the operating system and any other programs also need some RAM, therefore it is safer to not use all free memory. Be aware that i.segment will take a long time (several days) to process such a large region.</div><div><br></div><div>></div>> Should the output image from 'r.in.gdal' have had more memory allocated than the 300mb?<br><div><br></div><div>The memory option of r.in.gdal applies to the input image, not the output image. Sometimes more memory can help, sometimes it does not have any effect. However, it does not affect subsequent processing steps.</div><div><br></div><div>Markus M<br></div><div><br></div><div>></div>> Thanks again Markus...I appreciate your help.<br>><br>> Paul Shapley                          <br>><br>><br>>                            <br>><br>> On 20 June 2018 at 16:15, Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a><wbr>> wrote:<br>>><br>>><br>>><br>>> On Wed, Jun 20, 2018 at 1:30 PM, Paul Shapley <<a href="mailto:p.shapley@gmail.com" target="_blank">p.shapley@gmail.com</a>> wrote:<br>>> ><br>>> > Hi Users,<br>>> ><br>>> > Apologies if i'm posting this error again but i need to get pass the memory allocation issue of trying to allocate 3gb memory. The Grass version is (using file r.contour). Processor has 32 gb ram and i've allocated 30000 mb under memory option of 'i.segment'.<br>>> ><br>>> > System Info                                                                    <br>>> > GRASS version: 7.4.1                                                            <br>>> > GRASS SVN revision: r72807                                                      <br>>> > Build date: 2018-06-13                                                          <br>>> > Build platform: i386-w64-mingw32                                                <br>>> > GDAL: 2.2.4                                                                    <br>>> > PROJ.4: 4.9.3                                                                  <br>>> > GEOS: 3.5.0                                                                    <br>>> > SQLite: 3.17.0                                                                  <br>>> > Python: 2.7.4                                                                  <br>>> > wxPython: 2.8.12.1                                                              <br>>> > Platform: Windows-2008ServerR2-6.1.7601-<wbr>SP1 (OSGeo4W)                          <br>>> >                                                                                <br>>> ><br>>> > ERROR: G_malloc: unable to allocate 2995426350 bytes of memory at imagery/i.segment/flag.c:25<br>>><br>>> this error appears because all other memory has already been allocated, there is less than 3 GB free RAM left.<br>>><br>>> It seems that the current region has more than 20 billion grid cells. Does this match the input to i.segment? You might want to check the current region settings and compare them with extents and resolution as reported by <a href="http://r.info" target="_blank">r.info</a> on the input to i.segment.<br>>><br>>> Please provide the output of g.region -p and <a href="http://r.info" target="_blank">r.info</a> if you want more detailed help.<br>>><br>>> Markus M<br>>><br>>> ><br>>> > --<br>>> > Paul J. Shapley MSc CGeog (GIS) FRGS<br>>> ><br>>> ><br>>> > ______________________________<wbr>_________________<br>>> > grass-user mailing list<br>>> > <a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>>> > <a href="https://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a><br>>><br>><br>><span class="HOEnZb"><font color="#888888"><br>><br>> --<br>> Paul J. Shapley MSc CGeog (GIS) FRGS<br>><br></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b>Paul J. Shapley </b><span style="font-family:times new roman,serif"><font size="2"><span style="font-family:arial,helvetica,sans-serif">MSc CGeog (GIS) FRGS</span></font><br></span><b><br></b></div></div>
</div>