<div dir="ltr"><div dir="ltr"></div>Hi Nicolas,<div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno dom 1 gen 2023 alle ore 04:53 Nicolas Cadieux <<a href="mailto:njacadieux.gitlab@gmail.com">njacadieux.gitlab@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"><div dir="ltr"><br><div dir="ltr"><div><div>Try decimal with commas. Check your local system settings.  Could this be a wrong CRS problem?  Try zoom to layer extent to see if they pop up in the wrong place.  Share a few examples so we can check. Try  exporting the geometries to Wkt in a new field to see what happens…. <br></div></div></div></div></div></div></blockquote><div><br></div><div>Thank you for your suggestions, particularly the "geom_to_WKT", it let me discover problem.</div><div>IMHO this is a bug in "geometry by expression" algorithm.<br></div><div><br></div><div>By my exoeriences, this algorithm works _only_ if source layer has at almost one feature.</div><div>If so, you can add new feature by this expression: </div><div>make_point(to_real(@Long),to_real(lat)) </div><div>where @Long and @Lat are two project variables. Everything works as expected.</div><div><br></div><div>Otherwise, e.g. when the source layer has no feature (empty layer), the geometry by expression fails and return <null> geometry, even if the preview in expression generator is correct.</div><div><br></div><div>In my test, i was usual to truncate the source layer before generate new geometry.</div><div>This caused the fail of geometry by expression algorithm.</div><div><br></div><div>Instead, if i don't truncate source layer (and it has at almost one geometry before running the model), then the algorithm works.</div><div><br></div><div>This is a bit confusing, because in the  "geometry by expression" documentation there is no reference to this condition.</div><div>Could this be a bug?</div><div>Is it possible to add new features to a empty layer with geometry by expression?</div><div><br></div><div>Again, thank you to everyone and have a nice year!</div><div><br></div><div>Francesco</div><div><br></div></div></div></div>