< 242022-04-25⋎26 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
14:14ludwa6[m]g'day room: am having some trouble here moving plant assets (trees) into a field (orchard), by selecting them from a list and applying the "move" (from dropdown) function; i choose the field and tick the "mark as done" button, which does create a transplanting log for these two assets... but then they don't appear under "assets" tab of that particular land asset. Does this make any sense? (am working in v2.x, hosted at Farmier)
14:22mstenta[m]Hi ludwa6 - hmm I wonder if this is a caching issue? I will try clearing your cache - let's see if that changes anything...
14:23ludwa6[m]mstenta[m]: thanks mstenta ; let me know when and i will try again
14:24mstenta[m]Done - can you check to see if that did anything?
14:24*checks
14:24mstenta[m]I can't really see why that would be the issue tho 🤔
14:24mstenta[m]Oh question: are the assets you moved marked as "Is Fixed"?
14:24mstenta[m]That would override their movement location
14:25mstenta[m]And would instead use their "intrinsic geometry"
14:25mstenta[m]farmos.org/model/logic/location/
14:25ludwa6[m]mstenta[m]: ah, yes: they are trees, which i plotted on map of Land asset as a point, and then ticked the "fixed" button.
14:26mstenta[m]oh ok! that explains it
14:26ludwa6[m]all that on creation, before i did the transplant
14:26mstenta[m]in that case, maybe you don't need a movement log
14:26ludwa6[m]so the fix is...?
14:26mstenta[m]it's an either/or...
14:26mstenta[m]either they are fixed, and you give them intrinsic geometry, or they are not fixed and you use a movement log
14:26ludwa6[m]well... They didn't show up as an asset of that field, which is why i then went and did a transplant -which is logged
14:27mstenta[m]yea! having a transplant log for trees is valuable... i just planted some fruit trees here and that's the approach i used (NOT fixed)
14:28ludwa6[m]ok. so going forward: i will create the assets (even after planting, as tho they are not yet), NOT mark as fixed...
14:28ludwa6[m]... But should i plot them on the map? then go and do the transplant?
14:29mstenta[m]If you are going to record a transplanting log then THAT is where you would plot them on the map
14:29mstenta[m]where you transplanted them
14:29ludwa6[m]ah, ok -haven't yet done a mapping on the transplant log form, but i'll take your word for it. that is there.
14:29mstenta[m]yup!
14:29mstenta[m]works the same as in v1
14:30mstenta[m]we added the concept of "intrinsic geometry" and "is fixed" to assets in v2
14:30ludwa6[m]OK, so i'll go back now, delete the transplants, change the assets to have no geometry
14:30mstenta[m]but before that, assets never had an intrinsic geometry - it ALWAYS came from logs
14:30mstenta[m]you don't need to delete the transplant
14:30mstenta[m]just edit the assets and uncheck the "Is fixed" box
14:30*goes to unfix them
14:30mstenta[m]then farmOS's location logic will use the transplant logs instead
14:31mstenta[m](now i'm wondering if your cache invalidation logic covers this case... toggling "is fixed"... 🤞)
14:32mstenta[m]s/your/our/
14:33mstenta[m]oh one more thing... in your transplant log, you can also edit the geomtry to make it a single point, rather than the whole field/area geometry
14:33mstenta[m](to show exactly where you transplanted... and thus make that the point that appears on your map of assets for that particular tree)
14:33ludwa6[m]yeah, i gotta go into those transplanting logs now and fix them as points
14:34mstenta[m]if you still have the points saved in the assets themselves you can copy and paste the WKT data
14:34ludwa6[m]Good thing i decided to validate these (2) entries before entering the many more trees i have to do!
14:34ludwa6[m]mstenta[m]: ? when i changed the "is fixed" param to false, the geometry disappeared
14:35mstenta[m]ah yea - so you'd have to toggle it back on, copy, then back off :-)
14:35mstenta[m](pretty sure it keeps the intrinsic geometry there behind the scenes, even though it's no longer used)
14:37ludwa6[m]mstenta[m]: right you are -so i did, and i have the location to apply to the transplant...
14:37ludwa6[m]... but problem is: i transplanted 2 trees in 1 operation
14:38mstenta[m]ooh
14:38mstenta[m]well you need two logs then!
14:38mstenta[m]:-)
14:38ludwa6[m]mstenta[m]: grr... ok
14:38mstenta[m]if you want that level of granularity...
14:39ludwa6[m]i thought i did, but now i'm rethinking it
14:39ludwa6[m]actually the level of granularity i need is neither fixed point, nor somewhere in the field, but rather on a particular line (of irrigation) in the field
14:39mstenta[m]are you planting lots of trees? and are they all the same type? if so, then maybe you just need one asset+log per type? with multiple points mapped per lpog
14:40ludwa6[m]like the way user "kyle" describes doing it in this thread: farmos.discourse.group/t/orchard-in-farm
14:41ludwa6[m]in fact i have a goodly bunch of tree lines to plot (~a dozen or so), so i need to figure out a good workflow for this.
14:53ludwa6[m]so mstenta : now that i've deleted that transplanting log, and (having saved the geometry before i "unfixed" those two plant assets), gone back and transplanted each asset to it proper point location, they do show up on the map of that particular asset... But then at field level, those two points don't show up.
14:53ludwa6[m]question: how can i get all those trees i am mapping as points to show up with the field in which they are embedded?
14:54mstenta[m]do they show up on the map when you go to Records > Assets > Plants?
14:54ludwa6[m]mstenta[m]: ah, yes -they do!
14:55mstenta[m]great! the reason for that is they are now being treated as "moveable assets" rather than "fixed locations"
14:55mstenta[m]some maps only show locations
14:56mstenta[m]a next step might be to add a map to the "Assets" tab of the location itself
14:56ludwa6[m]ok, but... What's the right way to do this? can a tree be a fixed location?
14:56mstenta[m]so when you are looking at the list of assets in a location you can see them on a map at the top
14:56mstenta[m]any asset can be a fixed location!
14:57ludwa6[m]mstenta[m]: well... semantically, i would say a tree HAS a fixed location, not that it is one.
14:57mstenta[m]it just changes the way that farmOS "calculates" where it is
14:57mstenta[m]yes - it's a bit of a special meaning in this case :-)
14:57mstenta[m]farmos.org/model/logic/location/
14:58mstenta[m]the "is location" and "is fixed'" properties of assets are important to how "location" is determined
14:58mstenta[m]if an asset is fixed, that means that it has an intrinsic geometry and does not move
14:59mstenta[m]and yes... a tree does not move... but it DID move! :-)
14:59mstenta[m]and it CAN move... you just probably won't ever move it
15:00ludwa6[m]mstenta[m]: Would it make sense in such case to create a map at the level of the Land asset that is the orchard? a map which indicates all the trees and/or tree lines?
15:00mstenta[m]yes that's what i was thinking (if i understand you correctly)
15:00ludwa6[m]mstenta[m]: an orchard tree typically moves once: from nursery to implantation in field
15:01mstenta[m]precisely. it moved. and you want to use a transplanting log to represent that movement.
15:01mstenta[m]maybe that's the only movement it will ever have
15:01mstenta[m]unless you're in the business of raising saplings, digging them up, and selling root balls........
15:02mstenta[m]if an asset moved EVER in its lifetime, it is by definition not "fixed" (according to farmOS logic)
15:02mstenta[m]that's how it works, and how to think about it :-)
15:02ludwa6[m]mstenta[m]: We don't sell root balls, but we do raise our own stock (some plant types) either in nursery pots or a nursery bed, which we later transplant
15:03mstenta[m]cool! that was just an example where someone MAY move a tree again in the future perhaps :-)
15:03mstenta[m]i'm basically just explaining how to think about the difference between a "fixed" asset and a non-fixed asset
15:04mstenta[m]you really can use either!
15:04ludwa6[m]And when we buy in nursery stock: usually they are transplanted immediately to orchard, but sometimes they can stay a time in our nursery. Dunno if i want to model that... So maybe bought-in transplants should just be set up as fixed assets in the first place?
15:04mstenta[m]it just depends on how you need to manage the records
15:04mstenta[m]i would probably recommend only thinking of land/structures/etc as "fixed"
15:05mstenta[m]that is why we added the idea in the first place... because we needed to make "Areas" in farmOS v1 into "Assets" in v2... and areas in v1 were fixed with an intrinsic geometry... there was no such concept in assets before v2
15:05ludwa6[m]mstenta[m]: yeah, cuz... When i. tried to set up the trees as fixed assets with a specific point location, it didn't work -i still don't understand why
15:06mstenta[m]it did work... just not the way you wanted :-)
15:06mstenta[m](depends on what you mean by "work" haha)
15:06ludwa6[m]Q: if i had set those trees up with "true" param set for both "is fixed" AND "is location"... would that have worked?
15:07mstenta[m]that depends... what did you want to happen?
15:07ludwa6[m]two things:
15:07ludwa6[m](1) they show up on the "Assets" tab of the field in which located; and
15:07ludwa6[m](2) they show up on the map
15:08mstenta[m]> (1) they show up on the "Assets" tab of the field in which located; and
15:08mstenta[m]the "Assets" tab only shows assets that have been "moved" to the location, not fixed ones
15:08mstenta[m]> (2) they show up on the map
15:08mstenta[m]fixed locations show up on the dashboard map
15:09mstenta[m]non-fixed assets show up on the Records > Assets > ... maps
15:09ludwa6[m]> <@mstenta:matrix.org> > (1) they show up on the "Assets" tab of the field in which located; and
15:09ludwa6[m]>
15:09ludwa6[m]> the "Assets" tab only shows assets that have been "moved" to the location, not fixed ones
15:09ludwa6[m]So: that makes this approach a no-go
15:09mstenta[m]what approach? transplant logs?
15:09ludwa6[m]SO: looks like i have to create all these trees as plant assets within location of that field...
15:10ludwa6[m]... and then go and do an individual transplant on each one
15:10ludwa6[m]mstenta[m]: no, i was hoping to map them all w/in the field on creation of the asset.
15:11ludwa6[m]ludwa6[m]: NOT "is fixed" and NOT "is location"
15:11mstenta[m]gotcha. yea that's not currently possible. you will need to create two records: asset + log
15:11mstenta[m]if you want them to show up under the "Assets" tab of the orchard
15:12mstenta[m]now... i'll throw one more wrench... :-)
15:12mstenta[m]if they are "is fixed" and "is location", then they WILL show up under the "Locations" tab of the orchard asset...
15:13ludwa6[m]But this is reminding me of something: that "Import assets" script paul121 wrote checks if the asset exists, and if not creates the asset AND a transplant log, to locate it correctly in the field.
15:13mstenta[m]but that is slightly different... and if it were me i would model them as unfixed assets with transplanting logs personally - it just makes more sense - albeit requires more data entry
15:14mstenta[m]but if data entry is the problem - then solve that... don't go down a path of data modeling that you might regret just because it's easier
15:14ludwa6[m]I was not thinking to use that script (designed for market garden use) for this orchard purpose... But now i think it might be the best approach, if it doesn't need significant modification
15:14mstenta[m]yea! i was going to suggest that kind of thought process... solve for the problem at hand: data entry
15:15mstenta[m]if you can script it, all the better!
15:15ludwa6[m]mstenta[m]: exactly.
15:15mstenta[m]the trickiest part will probably still be getting all the GPS points separated
15:15mstenta[m]this particular point (pun intended) is a bit more complex than Paul's script for vegetable crops, i assume
15:15ludwa6[m]mstenta[m]: dunno if i can... but paul121 surely can. maybe he already has; i have to see if i can run that script in this new orchard use case
15:16ludwa6[m]mstenta[m]: it doesn't do points, but it does lines -which is all the granularity i really need for this, as i said above
15:16mstenta[m]the "easy" part about Paul's script is it didn't need to define precise geometry... just the location they were being moved to (so the plant assets would automatically receive the full field/bed geometry)
15:16mstenta[m]oh ok sorry, i haven't looked at that script in detail...
15:17mstenta[m]so maybe i'm wrong about how it works
15:17ludwa6[m]yeah, we haven't yet shared it in usable form, tho it's here: colab.research.google.com/drive/1AtbWfa5
15:17mstenta[m]but either way... for this case, you will essentially need a spreadsheet with a row for each tree, and a column for each point - right?
15:18mstenta[m](among other columns)
15:19ludwa6[m]mstenta[m]: row for each tree YES... but column just has to be the name of field:bed
15:19ludwa6[m]bed = a line
15:19mstenta[m]ahh right ok... because you decided you're not going to do a single point per tree... ?
15:20mstenta[m]and you will pre-make all the lines ahead of time as Land assets of type "Bed"?
15:20mstenta[m]in that case, then yes Paul's script might be all you need!
15:20ludwa6[m]mstenta[m]: yes, in light of this complexity of which i wasn't aware -i don't need point-level granularity (tho it would be nice); line-level granularity will do
15:21ludwa6[m]mstenta[m]: yes: that's they key: i must go do some lines (heh: something i haven't said since back in those hazy disco days :-)
16:02ludwa6[m]one Q mstenta , before i go too nuts w/ creating geometry in farmOS: is it possible to export a set (or all) of polygons, lines and points as a .KML file?
16:07ludwa6[m]ludwa6[m]: or i guess it could be CSV, if it included all the lat & lon values in such a way that it could be imported into a GIS or Google Earth
16:12mstenta[m]Yes there is a bulk KML export action
16:12mstenta[m]On all assets/logs lists
16:12mstenta[m]If you don't see it then you may need to enable the module
16:13mstenta[m]I'm out planting potatoes right now... Might not see your messages... Hope that helps! :-)
17:10ludwa6[m]<mstenta[m]> "If you don't see it then you may..." <- Cool! have added the module, and she works like a champ. Thanks, mstenta !

< 242022-04-25⋏26 >