[Qgis-user] spatialjoin

2016-12-20 Thread Laurent Bourlet

Hi at all

I'm a beginner in Qgis and i would make a dynamic spatialjoin.
In fact , i have created a vector layer ( for example  A) and i grab 
points in it when I'm outdoor ( these points are buildings unknowned by 
the government and so these building are not taxed ...) . I have also a 
layer (B) with the name of the owners of these lands .

You see what i would ?...
I would have these names transferred as attribut from B to A .
For that , i think about a spatialjoin with a dynamic feature . So i 
have downloaded the two plugins "reffunction" and "spatialjoin".

But i have certainly maked something wrong because i don't succeed ...

Is it the good method ?

And If yes , and if exist a doc about these plugins ...i'll take it :-))

regards

Laurent

( pour les francophones ...je repère et saisis des points représentants  
des batiments construits et visibles par Google Map mais inconnus par le 
cadastre et donc les impôts ...je voudrais donc enrichir la couche de 
saisie par les références des parcelles et les noms des propriétaires 
par une jointure spatiale dynamique ..à chaque point saisi , "monte" 
cette référence )


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] spatialjoin

2016-12-20 Thread Randal Hale
In your layer B - Do the Names of the Owners have a location (like a tax 
parcel) or are they a spreadsheet (like Microsoft Excel)?


Randy


On 12/20/2016 06:03 PM, Laurent Bourlet wrote:

Hi at all

I'm a beginner in Qgis and i would make a dynamic spatialjoin.
In fact , i have created a vector layer ( for example  A) and i grab 
points in it when I'm outdoor ( these points are buildings unknowned 
by the government and so these building are not taxed ...) . I have 
also a layer (B) with the name of the owners of these lands .

You see what i would ?...
I would have these names transferred as attribut from B to A .
For that , i think about a spatialjoin with a dynamic feature . So i 
have downloaded the two plugins "reffunction" and "spatialjoin".

But i have certainly maked something wrong because i don't succeed ...

Is it the good method ?

And If yes , and if exist a doc about these plugins ...i'll take it :-))

regards

Laurent

( pour les francophones ...je repère et saisis des points 
représentants  des batiments construits et visibles par Google Map 
mais inconnus par le cadastre et donc les impôts ...je voudrais donc 
enrichir la couche de saisie par les références des parcelles et les 
noms des propriétaires par une jointure spatiale dynamique ..à chaque 
point saisi , "monte" cette référence )


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user


--
-
Randal Hale
North River Geographic Systems, Inc
http://www.northrivergeographic.com
423.653.3611 rjh...@northrivergeographic.com
twitter:rjhale

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] spatialjoin

2016-12-20 Thread Erwan Conseil
Hi
In my layer B , I have the name of the owner and the number of the parcel : 
this number , a polygon , have a WKT location . All this is in a SHP . As I 
grab points in layer A directly in Qgis (2.18) , I have also a SHP . And i need 
a dynamic join because I have no desire to make the spatial join each time...
Regards
Laurent 

> Le 21 déc. 2016 à 01:30, Randal Hale  a 
> écrit :
> 
> In your layer B - Do the Names of the Owners have a location (like a tax 
> parcel) or are they a spreadsheet (like Microsoft Excel)?
> 
> Randy
> 
> 
>> On 12/20/2016 06:03 PM, Laurent Bourlet wrote:
>> Hi at all
>> 
>> I'm a beginner in Qgis and i would make a dynamic spatialjoin.
>> In fact , i have created a vector layer ( for example  A) and i grab points 
>> in it when I'm outdoor ( these points are buildings unknowned by the 
>> government and so these building are not taxed ...) . I have also a layer 
>> (B) with the name of the owners of these lands .
>> You see what i would ?...
>> I would have these names transferred as attribut from B to A .
>> For that , i think about a spatialjoin with a dynamic feature . So i have 
>> downloaded the two plugins "reffunction" and "spatialjoin".
>> But i have certainly maked something wrong because i don't succeed ...
>> 
>> Is it the good method ?
>> 
>> And If yes , and if exist a doc about these plugins ...i'll take it :-))
>> 
>> regards
>> 
>> Laurent
>> 
>> ( pour les francophones ...je repère et saisis des points représentants  des 
>> batiments construits et visibles par Google Map mais inconnus par le 
>> cadastre et donc les impôts ...je voudrais donc enrichir la couche de saisie 
>> par les références des parcelles et les noms des propriétaires par une 
>> jointure spatiale dynamique ..à chaque point saisi , "monte" cette référence 
>> )
>> 
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
> -- 
> -
> Randal Hale
> North River Geographic Systems, Inc
> http://www.northrivergeographic.com
> 423.653.3611 rjh...@northrivergeographic.com
> twitter:rjhale
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] spatialjoin

2016-12-21 Thread Randal Hale

2 things:

1. In QGIS there is a processing toolbox (I assume you are one something 
as new as version 2.14.8). Open it (it's at the top -> Processing -> 
Toolbox). You can search for tools. Search for "join" and you should see 
a "Join Attributes by location". This is a spatial join.


2. THE MOST IMPORTANT THING. You mentioned you had collected points with 
a GPS. Possibly these points are in EPSG:4326. I'm going to guess that 
your parcel layer isn't. If you right click your parcel layer (in the 
layers panel) it will allow you to select properties. On the General Tab 
you will see the Coordinate Reference System mentioned and many times it 
is something like EPSG: . A Spatial Join must have the layers in the 
same coordinate system.


If it is different - Right Click on your GPS points and "Save as". When 
the "Save vector layer as" window comes up. Save it as a shapefile 
and MOST IMPORTANTLY change the CRS to match your parcel layer. Click on 
the small globe (that appears to be wearing a hat) and in the filter 
type in the number you see for your parcels. You can then select that 
projection and Save your file. It should save. You can then perform the 
"join by location".


It should work. You are very close though so don't worry.

Randy



On 12/21/2016 01:24 AM, Erwan Conseil wrote:

Hi
In my layer B , I have the name of the owner and the number of the parcel : 
this number , a polygon , have a WKT location . All this is in a SHP . As I 
grab points in layer A directly in Qgis (2.18) , I have also a SHP . And i need 
a dynamic join because I have no desire to make the spatial join each time...
Regards
Laurent


Le 21 déc. 2016 à 01:30, Randal Hale  a écrit :

In your layer B - Do the Names of the Owners have a location (like a tax 
parcel) or are they a spreadsheet (like Microsoft Excel)?

Randy



On 12/20/2016 06:03 PM, Laurent Bourlet wrote:
Hi at all

I'm a beginner in Qgis and i would make a dynamic spatialjoin.
In fact , i have created a vector layer ( for example  A) and i grab points in 
it when I'm outdoor ( these points are buildings unknowned by the government 
and so these building are not taxed ...) . I have also a layer (B) with the 
name of the owners of these lands .
You see what i would ?...
I would have these names transferred as attribut from B to A .
For that , i think about a spatialjoin with a dynamic feature . So i have downloaded the two 
plugins "reffunction" and "spatialjoin".
But i have certainly maked something wrong because i don't succeed ...

Is it the good method ?

And If yes , and if exist a doc about these plugins ...i'll take it :-))

regards

Laurent

( pour les francophones ...je repère et saisis des points représentants  des batiments 
construits et visibles par Google Map mais inconnus par le cadastre et donc les impôts 
...je voudrais donc enrichir la couche de saisie par les références des parcelles et les 
noms des propriétaires par une jointure spatiale dynamique ..à chaque point saisi , 
"monte" cette référence )

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

--
-
Randal Hale
North River Geographic Systems, Inc
http://www.northrivergeographic.com
423.653.3611 rjh...@northrivergeographic.com
twitter:rjhale

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user


--
-
Randal Hale
North River Geographic Systems, Inc
http://www.northrivergeographic.com
423.653.3611 rjh...@northrivergeographic.com
twitter:rjhale

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] spatialjoin

2016-12-21 Thread Bernd Vogelgesang

Hi,

for me this sounds more like he is getting new points once in a while and
wants to join those attributes to the new points "automatically" from the
parcel layer.

The biggest problem for users is to rethink the workflow from the end to
the beginning and to know the limitations.

The outcome should be a point layer with the polygons attributes. If those
points (layer A) are from GPS as Randy assumes, they have to be
reprojected to the parcels layer (layer B) before being able to join them
spatially(layer C). The spatial join in the toolbox produces layer D.

Most probably, the resulting layer D is going to to be edited in some way
(adding notes about size, the progress, classifications, whatever), so you
will have to find a way to preserve those new attribute while being able to
add new points without much trouble.

The processing toolbox is a good way to do these steps, though it produces
a lot of temporary files cluttering the project.

A better way for all those repetitive tasks, is to use the graphical
modeller, to create a workflow which only has to be triggered once new
points come in, and the resulting file can be saved as new a file e.g.
with the current date in the name, so you have kind of an archive and do  
not

overwrite previous files (and destroy your work in case something goes
wrong).

So I can imagine a model with input layer A (new points in WGS84 without  
attributes) and a parcel layer B (in whatever projection).

reproject layer A and C will be created as an intermediate step.

Next input layer is the latest result layer D, reprojected and with  
attributes.
Merge layer C and D -> E. Now delete all columns which are from layer B  
(from the last spatial join. Unfortunately, you can only delete one field  
at a time in the modeller, so you'll will have to add the command several  
times in a row to the model) -> Fn

Do the spatial join of Fn with B.

The last result G will now hold all points with the corresponding parcel  
info plus additional fields you might have added to the points.

G will be the input D in the next run with fresh points.

So, do not add new points to the already existing collection of points in  
WGS84 (it is never save to edit layers without backup), but just import  
them as a new input set and then run the model with the parcel layer and  
the last result layer.


The modeller is not as intuitive as it should be, but it can save you a  
lot of time once you managed to set up a model.


Maybe I was completely wrong analysing the problem, but maybe someone else  
has the problem that fits to my solution ;)

Cheers
Bernd





Am 21.12.2016, 14:07 Uhr, schrieb Randal Hale
:


2 things:

1. In QGIS there is a processing toolbox (I assume you are one something  
as new as version 2.14.8). Open it (it's at the top -> Processing ->  
Toolbox). You can search for tools. Search for "join" and you should see  
a "Join Attributes by location". This is a spatial join.


2. THE MOST IMPORTANT THING. You mentioned you had collected points with  
a GPS. Possibly these points are in EPSG:4326. I'm going to guess that  
your parcel layer isn't. If you right click your parcel layer (in the  
layers panel) it will allow you to select properties. On the General Tab  
you will see the Coordinate Reference System mentioned and many times it  
is something like EPSG: . A Spatial Join must have the layers in the  
same coordinate system.


If it is different - Right Click on your GPS points and "Save as". When  
the "Save vector layer as" window comes up. Save it as a shapefile  
and MOST IMPORTANTLY change the CRS to match your parcel layer. Click on  
the small globe (that appears to be wearing a hat) and in the filter  
type in the number you see for your parcels. You can then select that  
projection and Save your file. It should save. You can then perform the  
"join by location".


It should work. You are very close though so don't worry.

Randy



On 12/21/2016 01:24 AM, Erwan Conseil wrote:

Hi
In my layer B , I have the name of the owner and the number of the  
parcel : this number , a polygon , have a WKT location . All this is in  
a SHP . As I grab points in layer A directly in Qgis (2.18) , I have  
also a SHP . And i need a dynamic join because I have no desire to make  
the spatial join each time...

Regards
Laurent

Le 21 déc. 2016 à 01:30, Randal Hale   
a écrit :


In your layer B - Do the Names of the Owners have a location (like a  
tax parcel) or are they a spreadsheet (like Microsoft Excel)?


Randy



On 12/20/2016 06:03 PM, Laurent Bourlet wrote:
Hi at all

I'm a beginner in Qgis and i would make a dynamic spatialjoin.
In fact , i have created a vector layer ( for example  A) and i grab  
points in it when I'm outdoor ( these points are buildings unknowned  
by the government and so these building are not taxed ...) . I have  
also a layer (B) with the name of the owners of these lands .

You see what i would ?...
I would have these names transferr

Re: [Qgis-user] spatialjoin

2016-12-21 Thread Andrew
I am not totally clear on exactly how you want it to work so this may or
may not be helpful. I have something similar set up using the refFunctions
plugin you mentioned.  I believe that the layers need to be in the same CRS
for the reference functions.

If you want to simply add a field with names to a set of existing points
then you can use the field calculator and enter something like:
geomintersects('Layer B','name_field')

You can also set QGIS to calculate this for new features you digitize.  Add
a new field to Layer A and In the field properties set the default value to
the above formula.

Finally, if you need it to work with layers in different CRS and are
feeling pythonically adventurous I think it'd be pretty straightforward to
make a custom function to do it  Just copy the refFunctions
geomintersects() code into the function editor and add a bit to do a CRS
transformation on the feature.

Andrew

On Tue, Dec 20, 2016 at 3:03 PM, Laurent Bourlet  wrote:

> Hi at all
>
> I'm a beginner in Qgis and i would make a dynamic spatialjoin.
> In fact , i have created a vector layer ( for example  A) and i grab
> points in it when I'm outdoor ( these points are buildings unknowned by the
> government and so these building are not taxed ...) . I have also a layer
> (B) with the name of the owners of these lands .
> You see what i would ?...
> I would have these names transferred as attribut from B to A .
> For that , i think about a spatialjoin with a dynamic feature . So i have
> downloaded the two plugins "reffunction" and "spatialjoin".
> But i have certainly maked something wrong because i don't succeed ...
>
> Is it the good method ?
>
> And If yes , and if exist a doc about these plugins ...i'll take it :-))
>
> regards
>
> Laurent
>
> ( pour les francophones ...je repère et saisis des points représentants
> des batiments construits et visibles par Google Map mais inconnus par le
> cadastre et donc les impôts ...je voudrais donc enrichir la couche de
> saisie par les références des parcelles et les noms des propriétaires par
> une jointure spatiale dynamique ..à chaque point saisi , "monte" cette
> référence )
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] spatialjoin

2016-12-21 Thread Laurent Bourlet

Hi,

i thought it was more easy ...

In fact , i don't use a GPS because these points don't need precision : 
they are only used to identify the parcels . And i would like to catch 
their identity ( a number for each parcel and the owner ) if possible 
with a dynamic spatialjoin...


With booth data ( number of parcel and name of owner ) , i could talk 
with the fisc administration :-)


Randy was right ...i didn't have the same EPSG for the two layers . It's 
now OK ! but without the feature "dynamic" .


Indeed , i would avoid building many temporaries layers and i thought it 
existed a plugin for this  " dynamic" feature.


If no , i will ask my users to make spatialjoins some time to time ...

Waiting , i will try the solution of Bernd...

Thank you anyway !

laurent


Le 21/12/2016 à 17:46, Bernd Vogelgesang a écrit :

Hi,

for me this sounds more like he is getting new points once in a while and
wants to join those attributes to the new points "automatically" from the
parcel layer.

The biggest problem for users is to rethink the workflow from the end to
the beginning and to know the limitations.

The outcome should be a point layer with the polygons attributes. If 
those

points (layer A) are from GPS as Randy assumes, they have to be
reprojected to the parcels layer (layer B) before being able to join them
spatially(layer C). The spatial join in the toolbox produces layer D.

Most probably, the resulting layer D is going to to be edited in some way
(adding notes about size, the progress, classifications, whatever), so 
you
will have to find a way to preserve those new attribute while being 
able to

add new points without much trouble.

The processing toolbox is a good way to do these steps, though it 
produces

a lot of temporary files cluttering the project.

A better way for all those repetitive tasks, is to use the graphical
modeller, to create a workflow which only has to be triggered once new
points come in, and the resulting file can be saved as new a file e.g.
with the current date in the name, so you have kind of an archive and 
do not

overwrite previous files (and destroy your work in case something goes
wrong).

So I can imagine a model with input layer A (new points in WGS84 
without attributes) and a parcel layer B (in whatever projection).

reproject layer A and C will be created as an intermediate step.

Next input layer is the latest result layer D, reprojected and with 
attributes.
Merge layer C and D -> E. Now delete all columns which are from layer 
B (from the last spatial join. Unfortunately, you can only delete one 
field at a time in the modeller, so you'll will have to add the 
command several times in a row to the model) -> Fn

Do the spatial join of Fn with B.

The last result G will now hold all points with the corresponding 
parcel info plus additional fields you might have added to the points.

G will be the input D in the next run with fresh points.

So, do not add new points to the already existing collection of points 
in WGS84 (it is never save to edit layers without backup), but just 
import them as a new input set and then run the model with the parcel 
layer and the last result layer.


The modeller is not as intuitive as it should be, but it can save you 
a lot of time once you managed to set up a model.


Maybe I was completely wrong analysing the problem, but maybe someone 
else has the problem that fits to my solution ;)

Cheers
Bernd





Am 21.12.2016, 14:07 Uhr, schrieb Randal Hale
:


2 things:

1. In QGIS there is a processing toolbox (I assume you are one 
something as new as version 2.14.8). Open it (it's at the top -> 
Processing -> Toolbox). You can search for tools. Search for "join" 
and you should see a "Join Attributes by location". This is a spatial 
join.


2. THE MOST IMPORTANT THING. You mentioned you had collected points 
with a GPS. Possibly these points are in EPSG:4326. I'm going to 
guess that your parcel layer isn't. If you right click your parcel 
layer (in the layers panel) it will allow you to select properties. 
On the General Tab you will see the Coordinate Reference System 
mentioned and many times it is something like EPSG: . A Spatial 
Join must have the layers in the same coordinate system.


If it is different - Right Click on your GPS points and "Save as". 
When the "Save vector layer as" window comes up. Save it as a 
shapefile and MOST IMPORTANTLY change the CRS to match your parcel 
layer. Click on the small globe (that appears to be wearing a hat) 
and in the filter type in the number you see for your parcels. You 
can then select that projection and Save your file. It should save. 
You can then perform the "join by location".


It should work. You are very close though so don't worry.

Randy



On 12/21/2016 01:24 AM, Erwan Conseil wrote:

Hi
In my layer B , I have the name of the owner and the number of the 
parcel : this number , a polygon , have a WKT location . All this is 
in a SHP . As I grab points in la

Re: [Qgis-user] spatialjoin

2016-12-21 Thread Karl-Magnus Jönsson
Actually it is (easier). Or could be. If you are able to use spatial sql as in 
postgis. Maybe you could do something similar in spatialite. A little more work 
to set up the database but in the end there are a lot more possibilities. I 
would have done something like this (maybe not correct syntax. Read the 
referece!):

Create or replace view [viewname] as
Select
A.id,
A.attribute1,
B.attribute2,
A.geom
>From pointtable A, polygontable B
Where st_within(A.geom,B.geom);

If A.geom has to be transformed you could use st_transform inside the st_within 
function.
/Karl-Magnus Jönsson

21 dec 2016 kl. 19:23 skrev Laurent Bourlet 
mailto:laurentbourle...@gmail.com>>:

Hi,

i thought it was more easy ...

In fact , i don't use a GPS because these points don't need precision : they 
are only used to identify the parcels . And i would like to catch their 
identity ( a number for each parcel and the owner ) if possible with a dynamic 
spatialjoin...

With booth data ( number of parcel and name of owner ) , i could talk with the 
fisc administration :-)

Randy was right ...i didn't have the same EPSG for the two layers . It's now OK 
! but without the feature "dynamic" .

Indeed , i would avoid building many temporaries layers and i thought it 
existed a plugin for this  " dynamic" feature.

If no , i will ask my users to make spatialjoins some time to time ...

Waiting , i will try the solution of Bernd...

Thank you anyway !

laurent


Le 21/12/2016 à 17:46, Bernd Vogelgesang a écrit :
Hi,

for me this sounds more like he is getting new points once in a while and
wants to join those attributes to the new points "automatically" from the
parcel layer.

The biggest problem for users is to rethink the workflow from the end to
the beginning and to know the limitations.

The outcome should be a point layer with the polygons attributes. If those
points (layer A) are from GPS as Randy assumes, they have to be
reprojected to the parcels layer (layer B) before being able to join them
spatially(layer C). The spatial join in the toolbox produces layer D.

Most probably, the resulting layer D is going to to be edited in some way
(adding notes about size, the progress, classifications, whatever), so you
will have to find a way to preserve those new attribute while being able to
add new points without much trouble.

The processing toolbox is a good way to do these steps, though it produces
a lot of temporary files cluttering the project.

A better way for all those repetitive tasks, is to use the graphical
modeller, to create a workflow which only has to be triggered once new
points come in, and the resulting file can be saved as new a file e.g.
with the current date in the name, so you have kind of an archive and do not
overwrite previous files (and destroy your work in case something goes
wrong).

So I can imagine a model with input layer A (new points in WGS84 without 
attributes) and a parcel layer B (in whatever projection).
reproject layer A and C will be created as an intermediate step.

Next input layer is the latest result layer D, reprojected and with attributes.
Merge layer C and D -> E. Now delete all columns which are from layer B (from 
the last spatial join. Unfortunately, you can only delete one field at a time 
in the modeller, so you'll will have to add the command several times in a row 
to the model) -> Fn
Do the spatial join of Fn with B.

The last result G will now hold all points with the corresponding parcel info 
plus additional fields you might have added to the points.
G will be the input D in the next run with fresh points.

So, do not add new points to the already existing collection of points in WGS84 
(it is never save to edit layers without backup), but just import them as a new 
input set and then run the model with the parcel layer and the last result 
layer.

The modeller is not as intuitive as it should be, but it can save you a lot of 
time once you managed to set up a model.

Maybe I was completely wrong analysing the problem, but maybe someone else has 
the problem that fits to my solution ;)
Cheers
Bernd





Am 21.12.2016, 14:07 Uhr, schrieb Randal Hale
mailto:rjh...@northrivergeographic.com>>:

2 things:

1. In QGIS there is a processing toolbox (I assume you are one something as new 
as version 2.14.8). Open it (it's at the top -> Processing -> Toolbox). You can 
search for tools. Search for "join" and you should see a "Join Attributes by 
location". This is a spatial join.

2. THE MOST IMPORTANT THING. You mentioned you had collected points with a GPS. 
Possibly these points are in EPSG:4326. I'm going to guess that your parcel 
layer isn't. If you right click your parcel layer (in the layers panel) it will 
allow you to select properties. On the General Tab you will see the Coordinate 
Reference System mentioned and many times it is something like EPSG: . A 
Spatial Join must have the layers in the same coordinate system.

If it is different - Right Click on your GPS points and "

Re: [Qgis-user] spatialjoin

2016-12-21 Thread DelazJ
Hi,
Laurent, I can think about different ways you can test to tackle your
issues, provided you have two spatial layers that overlap (and without any
intermediate layer creation):
- recent QGIS introduce default values concept (
http://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#common-settings)
- i'm not really sure about its limitations though
- add a virtual field (
http://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/attribute_table.html#editing-attribute-values)
that you could later recalculate into a simple field
- use the Autofields plugin (http://plugins.qgis.org/plugins/AutoFields/)
- use the SpatialJoin plugin (http://plugins.qgis.org/plugins/spatialJoin/)

Except the SpatialJoin plugin option (which is internally based on it),
you'll need to write an expression likely based on refFunctions plugin
(e.g, geomintersects) someone mentioned above.

HTH,
Harrissou


2016-12-21 19:23 GMT+01:00 Laurent Bourlet :

> Hi,
>
> i thought it was more easy ...
>
> In fact , i don't use a GPS because these points don't need precision :
> they are only used to identify the parcels . And i would like to catch
> their identity ( a number for each parcel and the owner ) if possible with
> a dynamic spatialjoin...
>
> With booth data ( number of parcel and name of owner ) , i could talk with
> the fisc administration :-)
>
> Randy was right ...i didn't have the same EPSG for the two layers . It's
> now OK ! but without the feature "dynamic" .
>
> Indeed , i would avoid building many temporaries layers and i thought it
> existed a plugin for this  " dynamic" feature.
>
> If no , i will ask my users to make spatialjoins some time to time ...
>
> Waiting , i will try the solution of Bernd...
>
> Thank you anyway !
>
> laurent
>
>
>
> Le 21/12/2016 à 17:46, Bernd Vogelgesang a écrit :
>
>> Hi,
>>
>> for me this sounds more like he is getting new points once in a while and
>> wants to join those attributes to the new points "automatically" from the
>> parcel layer.
>>
>> The biggest problem for users is to rethink the workflow from the end to
>> the beginning and to know the limitations.
>>
>> The outcome should be a point layer with the polygons attributes. If those
>> points (layer A) are from GPS as Randy assumes, they have to be
>> reprojected to the parcels layer (layer B) before being able to join them
>> spatially(layer C). The spatial join in the toolbox produces layer D.
>>
>> Most probably, the resulting layer D is going to to be edited in some way
>> (adding notes about size, the progress, classifications, whatever), so you
>> will have to find a way to preserve those new attribute while being able
>> to
>> add new points without much trouble.
>>
>> The processing toolbox is a good way to do these steps, though it produces
>> a lot of temporary files cluttering the project.
>>
>> A better way for all those repetitive tasks, is to use the graphical
>> modeller, to create a workflow which only has to be triggered once new
>> points come in, and the resulting file can be saved as new a file e.g.
>> with the current date in the name, so you have kind of an archive and do
>> not
>> overwrite previous files (and destroy your work in case something goes
>> wrong).
>>
>> So I can imagine a model with input layer A (new points in WGS84 without
>> attributes) and a parcel layer B (in whatever projection).
>> reproject layer A and C will be created as an intermediate step.
>>
>> Next input layer is the latest result layer D, reprojected and with
>> attributes.
>> Merge layer C and D -> E. Now delete all columns which are from layer B
>> (from the last spatial join. Unfortunately, you can only delete one field
>> at a time in the modeller, so you'll will have to add the command several
>> times in a row to the model) -> Fn
>> Do the spatial join of Fn with B.
>>
>> The last result G will now hold all points with the corresponding parcel
>> info plus additional fields you might have added to the points.
>> G will be the input D in the next run with fresh points.
>>
>> So, do not add new points to the already existing collection of points in
>> WGS84 (it is never save to edit layers without backup), but just import
>> them as a new input set and then run the model with the parcel layer and
>> the last result layer.
>>
>> The modeller is not as intuitive as it should be, but it can save you a
>> lot of time once you managed to set up a model.
>>
>> Maybe I was completely wrong analysing the problem, but maybe someone
>> else has the problem that fits to my solution ;)
>> Cheers
>> Bernd
>>
>>
>>
>>
>>
>> Am 21.12.2016, 14:07 Uhr, schrieb Randal Hale
>> :
>>
>> 2 things:
>>>
>>> 1. In QGIS there is a processing toolbox (I assume you are one something
>>> as new as version 2.14.8). Open it (it's at the top -> Processing ->
>>> Toolbox). You can search for tools. Search for "join" and you should see a
>>> "Join Attributes by location". This is a spatial join.
>>>
>>> 2. THE M

Re: [Qgis-user] spatialjoin

2016-12-21 Thread DelazJ
Hi,

2016-12-21 21:39 GMT+01:00 Karl-Magnus Jönsson <
karl-magnus.jons...@kristianstad.se>:

> Actually it is (easier). Or could be. If you are able to use spatial sql
> as in postgis. Maybe you could do something similar in spatialite. A little
> more work to set up the database but in the end there are a lot more
> possibilities. I would have done something like this (maybe not correct
> syntax. Read the referece!):
>
> Actually, for many releases now, you can use SQL on any file format in
QGIS, shapefile included. No more need to put it inside a SpatiaLite base.
Simply use virtual layer
http://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/virtual_layers.html
within the DB Manager tool.

Regards,
Harrissou

> Create or replace view [viewname] as
> Select
> A.id,
> A.attribute1,
> B.attribute2,
> A.geom
> From pointtable A, polygontable B
> Where st_within(A.geom,B.geom);
>
> If A.geom has to be transformed you could use st_transform inside the
> st_within function.
>
> /Karl-Magnus Jönsson
>
>
> 21 dec 2016 kl. 19:23 skrev Laurent Bourlet :
>
> Hi,
>
> i thought it was more easy ...
>
> In fact , i don't use a GPS because these points don't need precision :
> they are only used to identify the parcels . And i would like to catch
> their identity ( a number for each parcel and the owner ) if possible with
> a dynamic spatialjoin...
>
> With booth data ( number of parcel and name of owner ) , i could talk with
> the fisc administration :-)
>
> Randy was right ...i didn't have the same EPSG for the two layers . It's
> now OK ! but without the feature "dynamic" .
>
> Indeed , i would avoid building many temporaries layers and i thought it
> existed a plugin for this  " dynamic" feature.
>
> If no , i will ask my users to make spatialjoins some time to time ...
>
> Waiting , i will try the solution of Bernd...
>
> Thank you anyway !
>
> laurent
>
>
> Le 21/12/2016 à 17:46, Bernd Vogelgesang a écrit :
>
> Hi,
>
>
> for me this sounds more like he is getting new points once in a while and
>
> wants to join those attributes to the new points "automatically" from the
>
> parcel layer.
>
>
> The biggest problem for users is to rethink the workflow from the end to
>
> the beginning and to know the limitations.
>
>
> The outcome should be a point layer with the polygons attributes. If those
>
> points (layer A) are from GPS as Randy assumes, they have to be
>
> reprojected to the parcels layer (layer B) before being able to join them
>
> spatially(layer C). The spatial join in the toolbox produces layer D.
>
>
> Most probably, the resulting layer D is going to to be edited in some way
>
> (adding notes about size, the progress, classifications, whatever), so you
>
> will have to find a way to preserve those new attribute while being able to
>
> add new points without much trouble.
>
>
> The processing toolbox is a good way to do these steps, though it produces
>
> a lot of temporary files cluttering the project.
>
>
> A better way for all those repetitive tasks, is to use the graphical
>
> modeller, to create a workflow which only has to be triggered once new
>
> points come in, and the resulting file can be saved as new a file e.g.
>
> with the current date in the name, so you have kind of an archive and do
> not
>
> overwrite previous files (and destroy your work in case something goes
>
> wrong).
>
>
> So I can imagine a model with input layer A (new points in WGS84 without
> attributes) and a parcel layer B (in whatever projection).
>
> reproject layer A and C will be created as an intermediate step.
>
>
> Next input layer is the latest result layer D, reprojected and with
> attributes.
>
> Merge layer C and D -> E. Now delete all columns which are from layer B
> (from the last spatial join. Unfortunately, you can only delete one field
> at a time in the modeller, so you'll will have to add the command several
> times in a row to the model) -> Fn
>
> Do the spatial join of Fn with B.
>
>
> The last result G will now hold all points with the corresponding parcel
> info plus additional fields you might have added to the points.
>
> G will be the input D in the next run with fresh points.
>
>
> So, do not add new points to the already existing collection of points in
> WGS84 (it is never save to edit layers without backup), but just import
> them as a new input set and then run the model with the parcel layer and
> the last result layer.
>
>
> The modeller is not as intuitive as it should be, but it can save you a
> lot of time once you managed to set up a model.
>
>
> Maybe I was completely wrong analysing the problem, but maybe someone else
> has the problem that fits to my solution ;)
>
> Cheers
>
> Bernd
>
>
>
>
>
>
> Am 21.12.2016, 14:07 Uhr, schrieb Randal Hale
>
> :
>
>
> 2 things:
>
>
> 1. In QGIS there is a processing toolbox (I assume you are one something
> as new as version 2.14.8). Open it (it's at the top -> Processing ->
> Toolbox). You can search for tools. Search for "join" and you sho

Re: [Qgis-user] spatialjoin

2016-12-21 Thread Andrew
Regarding the default values option/limitations, I can add that if you try
to use the default values expression dialog to build an expression using
geomintersects() the dialog will evaluate the expression as invalid.
Instead, build the expression in the field calculator and then copy/paste
it into default value box and skip using the expression dialog.

Andrew

On Wed, Dec 21, 2016 at 1:32 PM, DelazJ  wrote:

> Hi,
> Laurent, I can think about different ways you can test to tackle your
> issues, provided you have two spatial layers that overlap (and without any
> intermediate layer creation):
> - recent QGIS introduce default values concept (
> http://docs.qgis.org/testing/en/docs/user_manual/working_
> with_vector/vector_properties.html#common-settings) - i'm not really sure
> about its limitations though
> - add a virtual field (http://docs.qgis.org/2.14/en/
> docs/user_manual/working_with_vector/attribute_table.html#
> editing-attribute-values) that you could later recalculate into a simple
> field
> - use the Autofields plugin (http://plugins.qgis.org/plugins/AutoFields/)
> - use the SpatialJoin plugin (http://plugins.qgis.org/plugins/spatialJoin/
> )
>
> Except the SpatialJoin plugin option (which is internally based on it),
> you'll need to write an expression likely based on refFunctions plugin
> (e.g, geomintersects) someone mentioned above.
>
> HTH,
> Harrissou
>
>
> 2016-12-21 19:23 GMT+01:00 Laurent Bourlet :
>
>> Hi,
>>
>> i thought it was more easy ...
>>
>> In fact , i don't use a GPS because these points don't need precision :
>> they are only used to identify the parcels . And i would like to catch
>> their identity ( a number for each parcel and the owner ) if possible with
>> a dynamic spatialjoin...
>>
>> With booth data ( number of parcel and name of owner ) , i could talk
>> with the fisc administration :-)
>>
>> Randy was right ...i didn't have the same EPSG for the two layers . It's
>> now OK ! but without the feature "dynamic" .
>>
>> Indeed , i would avoid building many temporaries layers and i thought it
>> existed a plugin for this  " dynamic" feature.
>>
>> If no , i will ask my users to make spatialjoins some time to time ...
>>
>> Waiting , i will try the solution of Bernd...
>>
>> Thank you anyway !
>>
>> laurent
>>
>>
>>
>> Le 21/12/2016 à 17:46, Bernd Vogelgesang a écrit :
>>
>>> Hi,
>>>
>>> for me this sounds more like he is getting new points once in a while and
>>> wants to join those attributes to the new points "automatically" from the
>>> parcel layer.
>>>
>>> The biggest problem for users is to rethink the workflow from the end to
>>> the beginning and to know the limitations.
>>>
>>> The outcome should be a point layer with the polygons attributes. If
>>> those
>>> points (layer A) are from GPS as Randy assumes, they have to be
>>> reprojected to the parcels layer (layer B) before being able to join them
>>> spatially(layer C). The spatial join in the toolbox produces layer D.
>>>
>>> Most probably, the resulting layer D is going to to be edited in some way
>>> (adding notes about size, the progress, classifications, whatever), so
>>> you
>>> will have to find a way to preserve those new attribute while being able
>>> to
>>> add new points without much trouble.
>>>
>>> The processing toolbox is a good way to do these steps, though it
>>> produces
>>> a lot of temporary files cluttering the project.
>>>
>>> A better way for all those repetitive tasks, is to use the graphical
>>> modeller, to create a workflow which only has to be triggered once new
>>> points come in, and the resulting file can be saved as new a file e.g.
>>> with the current date in the name, so you have kind of an archive and do
>>> not
>>> overwrite previous files (and destroy your work in case something goes
>>> wrong).
>>>
>>> So I can imagine a model with input layer A (new points in WGS84 without
>>> attributes) and a parcel layer B (in whatever projection).
>>> reproject layer A and C will be created as an intermediate step.
>>>
>>> Next input layer is the latest result layer D, reprojected and with
>>> attributes.
>>> Merge layer C and D -> E. Now delete all columns which are from layer B
>>> (from the last spatial join. Unfortunately, you can only delete one field
>>> at a time in the modeller, so you'll will have to add the command several
>>> times in a row to the model) -> Fn
>>> Do the spatial join of Fn with B.
>>>
>>> The last result G will now hold all points with the corresponding parcel
>>> info plus additional fields you might have added to the points.
>>> G will be the input D in the next run with fresh points.
>>>
>>> So, do not add new points to the already existing collection of points
>>> in WGS84 (it is never save to edit layers without backup), but just import
>>> them as a new input set and then run the model with the parcel layer and
>>> the last result layer.
>>>
>>> The modeller is not as intuitive as it should be, but it can save you a
>>> lot of time once you managed 

Re: [Qgis-user] spatialjoin

2016-12-22 Thread Laurent Bourlet

Hi at all

i succeed !! thank's at all ...Andrew was right ... but i add an another 
thing ; i have indicated in the dialogue box , under "default value" , 
in "relational value" the name of the layer B , the right field etc... 
and now it's ok !


one more time , thank's !!

laurent


Le 21/12/2016 à 23:32, Andrew a écrit :
Regarding the default values option/limitations, I can add that if you 
try to use the default values expression dialog to build an expression 
using geomintersects() the dialog will evaluate the expression as 
invalid.  Instead, build the expression in the field calculator and 
then copy/paste it into default value box and skip using the 
expression dialog.


Andrew

On Wed, Dec 21, 2016 at 1:32 PM, DelazJ > wrote:


Hi,
Laurent, I can think about different ways you can test to tackle
your issues, provided you have two spatial layers that overlap
(and without any intermediate layer creation):
- recent QGIS introduce default values concept

(http://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#common-settings

)
- i'm not really sure about its limitations though
- add a virtual field

(http://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/attribute_table.html#editing-attribute-values

)
that you could later recalculate into a simple field
- use the Autofields plugin
(http://plugins.qgis.org/plugins/AutoFields/
)
- use the SpatialJoin plugin
(http://plugins.qgis.org/plugins/spatialJoin/
)

Except the SpatialJoin plugin option (which is internally based on
it), you'll need to write an expression likely based on
refFunctions plugin (e.g, geomintersects) someone mentioned above.

HTH,
Harrissou


2016-12-21 19:23 GMT+01:00 Laurent Bourlet
mailto:laurentbourle...@gmail.com>>:

Hi,

i thought it was more easy ...

In fact , i don't use a GPS because these points don't need
precision : they are only used to identify the parcels . And i
would like to catch their identity ( a number for each parcel
and the owner ) if possible with a dynamic spatialjoin...

With booth data ( number of parcel and name of owner ) , i
could talk with the fisc administration :-)

Randy was right ...i didn't have the same EPSG for the two
layers . It's now OK ! but without the feature "dynamic" .

Indeed , i would avoid building many temporaries layers and i
thought it existed a plugin for this " dynamic" feature.

If no , i will ask my users to make spatialjoins some time to
time ...

Waiting , i will try the solution of Bernd...

Thank you anyway !

laurent



Le 21/12/2016 à 17:46, Bernd Vogelgesang a écrit :

Hi,

for me this sounds more like he is getting new points once
in a while and
wants to join those attributes to the new points
"automatically" from the
parcel layer.

The biggest problem for users is to rethink the workflow
from the end to
the beginning and to know the limitations.

The outcome should be a point layer with the polygons
attributes. If those
points (layer A) are from GPS as Randy assumes, they have
to be
reprojected to the parcels layer (layer B) before being
able to join them
spatially(layer C). The spatial join in the toolbox
produces layer D.

Most probably, the resulting layer D is going to to be
edited in some way
(adding notes about size, the progress, classifications,
whatever), so you
will have to find a way to preserve those new attribute
while being able to
add new points without much trouble.

The processing toolbox is a good way to do these steps,
though it produces
a lot of temporary files cluttering the project.

A better way for all those repetitive tasks, is to use the
graphical
modeller, to create a workflow which only has to be
triggered once new
points come in, and the resulting file can be saved as new
a file e.g.
with the current date in the name, so you have kind of an
archive and do not
overwrite previous files (and destroy your work in case
something goes
wrong).

So I can imagine a model

Re: [Qgis-user] spatialjoin

2016-12-22 Thread Randal Hale

Congrats - sorry I was almost leading own a more labor intensive path.

So now I have a question? I'm on QGIS 2.18 on Linux - Where is 
geomintersects()?  I don't see it in Field calculator as something I can 
use (I have a lot of geom functions) but just not that currently. I was 
reading back through all the emails and maybe I'm missing something (I 
haven't tried my windows version yet).


Thanks in Advance,

Randy



On 12/22/2016 03:26 AM, Laurent Bourlet wrote:


Hi at all

i succeed !! thank's at all ...Andrew was right ... but i add an 
another thing ; i have indicated in the dialogue box , under "default 
value" , in "relational value" the name of the layer B , the right 
field etc... and now it's ok !


one more time , thank's !!

laurent


Le 21/12/2016 à 23:32, Andrew a écrit :
Regarding the default values option/limitations, I can add that if 
you try to use the default values expression dialog to build an 
expression using geomintersects() the dialog will evaluate the 
expression as invalid.  Instead, build the expression in the field 
calculator and then copy/paste it into default value box and skip 
using the expression dialog.


Andrew

On Wed, Dec 21, 2016 at 1:32 PM, DelazJ > wrote:


Hi,
Laurent, I can think about different ways you can test to tackle
your issues, provided you have two spatial layers that overlap
(and without any intermediate layer creation):
- recent QGIS introduce default values concept

(http://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#common-settings

)
- i'm not really sure about its limitations though
- add a virtual field

(http://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/attribute_table.html#editing-attribute-values

)
that you could later recalculate into a simple field
- use the Autofields plugin
(http://plugins.qgis.org/plugins/AutoFields/
)
- use the SpatialJoin plugin
(http://plugins.qgis.org/plugins/spatialJoin/
)

Except the SpatialJoin plugin option (which is internally based
on it), you'll need to write an expression likely based on
refFunctions plugin (e.g, geomintersects) someone mentioned above.

HTH,
Harrissou


2016-12-21 19:23 GMT+01:00 Laurent Bourlet
mailto:laurentbourle...@gmail.com>>:

Hi,

i thought it was more easy ...

In fact , i don't use a GPS because these points don't need
precision : they are only used to identify the parcels . And
i would like to catch their identity ( a number for each
parcel and the owner ) if possible with a dynamic spatialjoin...

With booth data ( number of parcel and name of owner ) , i
could talk with the fisc administration :-)

Randy was right ...i didn't have the same EPSG for the two
layers . It's now OK ! but without the feature "dynamic" .

Indeed , i would avoid building many temporaries layers and i
thought it existed a plugin for this  " dynamic" feature.

If no , i will ask my users to make spatialjoins some time to
time ...

Waiting , i will try the solution of Bernd...

Thank you anyway !

laurent



Le 21/12/2016 à 17:46, Bernd Vogelgesang a écrit :

Hi,

for me this sounds more like he is getting new points
once in a while and
wants to join those attributes to the new points
"automatically" from the
parcel layer.

The biggest problem for users is to rethink the workflow
from the end to
the beginning and to know the limitations.

The outcome should be a point layer with the polygons
attributes. If those
points (layer A) are from GPS as Randy assumes, they have
to be
reprojected to the parcels layer (layer B) before being
able to join them
spatially(layer C). The spatial join in the toolbox
produces layer D.

Most probably, the resulting layer D is going to to be
edited in some way
(adding notes about size, the progress, classifications,
whatever), so you
will have to find a way to preserve those new attribute
while being able to
add new points without much trouble.

The processing toolbox is a good way to do these steps,
though it produces
a lot of temporary files cluttering the project.

A better way for all those repetitive tasks, is t

Re: [Qgis-user] spatialjoin

2016-12-22 Thread DelazJ
Hi Randal,
You need refFunctions plugin installed

H.

Le jeudi 22 décembre 2016, Randal Hale  a
écrit :
> Congrats - sorry I was almost leading own a more labor intensive path.
>
> So now I have a question? I'm on QGIS 2.18 on Linux - Where is
geomintersects()?  I don't see it in Field calculator as something I can
use (I have a lot of geom functions) but just not that currently. I was
reading back through all the emails and maybe I'm missing something (I
haven't tried my windows version yet).
>
> Thanks in Advance,
>
> Randy
>
>
> On 12/22/2016 03:26 AM, Laurent Bourlet wrote:
>
> Hi at all
>
> i succeed !! thank's at all ...Andrew was right ... but i add an another
thing ; i have indicated in the dialogue box , under "default value" , in
"relational value" the name of the layer B , the right field etc... and now
it's ok !
>
> one more time , thank's !!
>
> laurent
>
> Le 21/12/2016 à 23:32, Andrew a écrit :
>
> Regarding the default values option/limitations, I can add that if you
try to use the default values expression dialog to build an expression
using geomintersects() the dialog will evaluate the expression as invalid.
Instead, build the expression in the field calculator and then copy/paste
it into default value box and skip using the expression dialog.
>
> Andrew
>
> On Wed, Dec 21, 2016 at 1:32 PM, DelazJ  wrote:
>>
>> Hi,
>> Laurent, I can think about different ways you can test to tackle your
issues, provided you have two spatial layers that overlap (and without any
intermediate layer creation):
>> - recent QGIS introduce default values concept (
http://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#common-settings)
- i'm not really sure about its limitations though
>> - add a virtual field (
http://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/attribute_table.html#editing-attribute-values)
that you could later recalculate into a simple field
>> - use the Autofields plugin (http://plugins.qgis.org/plugins/AutoFields/)
>> - use the SpatialJoin plugin (
http://plugins.qgis.org/plugins/spatialJoin/)
>>
>> Except the SpatialJoin plugin option (which is internally based on it),
you'll need to write an expression likely based on refFunctions plugin
(e.g, geomintersects) someone mentioned above.
>>
>> HTH,
>> Harrissou
>>
>>
>> 2016-12-21 19:23 GMT+01:00 Laurent Bourlet :
>>>
>>> Hi,
>>>
>>> i thought it was more easy ...
>>>
>>> In fact , i don't use a GPS because these points don't need precision :
they are only used to identify the parcels . And i would like to catch
their identity ( a number for each parcel and the owner ) if possible with
a dynamic spatialjoin...
>>>
>>> With booth data ( number of parcel and name of owner ) , i could talk
with the fisc administration :-)
>>>
>>> Randy was right ...i didn't have the same EPSG for the two layers .
It's now OK ! but without the feature "dynamic" .
>>>
>>> Indeed , i would avoid building many temporaries layers and i thought
it existed a plugin for this  " dynamic" feature.
>>>
>>> If no , i will ask my users to make spatialjoins some time to time ...
>>>
>>> Waiting , i will try the solution of Bernd...
>>>
>>> Thank you anyway !
>>>
>>> laurent
>>>
>>>
>>> Le 21/12/2016 à 17:46, Bernd Vogelgesang a écrit :

 Hi,

 for me this sounds more like he is getting new points once in a while
and
 wants to join those attributes to the new points "automatically" from
the
 parcel layer.

 The biggest problem for users is to rethink the workflow from the end
to
 the beginning and to know the limitations.

 The outcome should be a point layer with the polygons attributes. If
those
 points (layer A) are from GPS as Randy assumes, they have to be
 reprojected to the parcels layer (layer B) before being able to join
them
 spatially(layer C). The spatial join in the toolbox produces layer D.

 Most probably, the resulting layer D is going to to be edited in some
way
 (adding notes about size, the progress, classifications, whatever), so
you
 will have to find a way to preserve those new attribute while being
able to
 add new points without much trouble.

 The processing toolbox is a good way to do these steps, though it
produces
 a lot of temporary files cluttering the project.

 A better way for all those repetitive tasks, is to use the graphical
 modeller, to create a workflow which only has to be triggered once new
 points come in, and the resulting file can be saved as new a file e.g.
 with the current date in the name, so you have kind of an archive and
do not
 overwrite previous files (and destroy your work in case something goes
 wrong).

 So I can imagine a model with input layer A (new points in WGS84
without attributes) and a parcel layer B (in whatever projection).
 reproject layer A and C will be created as an intermediate step.

 Next input layer is the latest result 

Re: [Qgis-user] spatialjoin

2016-12-22 Thread Bernd Vogelgesang
Am 22.12.2016, 09:26 Uhr, schrieb Laurent Bourlet  
:




Hi at all

i succeed !! thank's at all ...Andrew was right ... but i add an another  
thing ; i have indicated in the dialogue box , under >"default value" ,  
in "relational value" the name of the layer B , the right field etc...  
and now it's ok !


one more time , thank's !!

laurent

Great!
Now it would would be nice if you would post a little walk-trough, so  
"old-fashioned" people like me have a chance to benefit from this a well.


Cheers
Bernd



Le 21/12/2016 à 23:32, Andrew a écrit :
Regarding the default values option/limitations, I can add that if you  
try to use the default values expression dialog >>to build an  
expression using geomintersects() the dialog will evaluate the  
expression as invalid.  Instead, build the >>expression in the field  
calculator and then copy/paste it into default value box and skip using  
the expression dialog.


Andrew

On Wed, Dec 21, 2016 at 1:32 PM, DelazJ  wrote:

Hi,
Laurent, I can think about different ways you can test to tackle your  
issues, provided you have two spatial layers >>>that overlap (and  
without any intermediate layer creation):
- recent QGIS introduce default values concept  
(http://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/>>>vector_properties.html#common-settings)  
- i'm not really sure about its limitations though
- add a virtual field  
(http://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/>>>attribute_table.html#editing-attribute-values)  
that you could later recalculate into a simple field
- use the Autofields plugin  
(http://plugins.qgis.org/plugins/AutoFields/)
- use the SpatialJoin plugin  
(http://plugins.qgis.org/plugins/spatialJoin/)


Except the SpatialJoin plugin option (which is internally based on  
it), you'll need to write an expression likely >>>based on  
refFunctions plugin (e.g, geomintersects) someone mentioned above.


HTH,
Harrissou


2016-12-21 19:23 GMT+01:00 Laurent Bourlet  
:

Hi,

i thought it was more easy ...

In fact , i don't use a GPS because these points don't need precision  
: they are only used to identify the parcels . And i would like  
to catch their identity ( a number for each parcel and the owner ) if  
possible with a dynamic spatialjoin...


With booth data ( number of parcel and name of owner ) , i could talk  
with the fisc administration :-)


Randy was right ...i didn't have the same EPSG for the two layers .  
It's now OK ! but without the feature "dynamic" .


Indeed , i would avoid building many temporaries layers and i thought  
it existed a plugin for this  " dynamic" feature.


If no , i will ask my users to make spatialjoins some time to time ...

Waiting , i will try the solution of Bernd...

Thank you anyway !

laurent


Le 21/12/2016 à 17:46, Bernd Vogelgesang a écrit :

Hi,

for me this sounds more like he is getting new points once in a  
while and
wants to join those attributes to the new points "automatically"  
from the

parcel layer.

The biggest problem for users is to rethink the workflow from the  
end to

the beginning and to know the limitations.

The outcome should be a point layer with the polygons attributes. If  
those

points (layer A) are from GPS as Randy assumes, they have to be
reprojected to the parcels layer (layer B) before being able to join  
them

spatially(layer C). The spatial join in the toolbox produces layer D.

Most probably, the resulting layer D is going to to be edited in  
some way
(adding notes about size, the progress, classifications, whatever),  
so you
will have to find a way to preserve those new attribute while being  
able to

add new points without much trouble.

The processing toolbox is a good way to do these steps, though it  
produces

a lot of temporary files cluttering the project.

A better way for all those repetitive tasks, is to use the graphical
modeller, to create a workflow which only has to be triggered once  
new
points come in, and the resulting file can be saved as new a file  
e.g.
with the current date in the name, so you have kind of an archive  
and do not
overwrite previous files (and destroy your work in case something  
goes

wrong).

So I can imagine a model with input layer A (new points in WGS84  
without attributes) and a parcel layer B (in >whatever  
projection).

reproject layer A and C will be created as an intermediate step.

Next input layer is the latest result layer D, reprojected and with  
attributes.
Merge layer C and D -> E. Now delete all columns which are from  
layer B (from the last spatial join. >Unfortunately, you can  
only delete one field at a time in the modeller, so you'll will have  
to add the command >several times in a row to the model) -> Fn

Do the spatial join of Fn with B.

The last result G will now hold all points with the corresponding  
parcel info plus additional fields you might >have added to the  
points.

G will be the input D in the next