Re: [Qgis-user] How calculate sequential values based on spatial pattern

2019-05-07 Thread Bernd Vogelgesang

Hi Alexandre,

did you find time have a look at this stuff?

I would be very interested in an "easy" solution with SQL and virtual
layers :)

Cheers,

Bernd

Am 05.05.19 um 10:25 schrieb Alexandre Neto:

That is actually quite easy using a bit of SQL in a virtual layer.
After all the west to east and north to south is just a matter of
adding a X and a Y fields and order first by X, then by Y.

I am not at my computer now, but when I came back I will try to get
you a ready to use query.

Alex

A qui, 2/05/2019, 17:39, Fernando M. Roxo da Motta mailto:pe...@roxo.org>> escreveu:

On Thu, 2 May 2019 06:52:43 +, Karl Magnus Jönsson
mailto:karl-magnus.jons...@kristianstad.se>> wrote:


> Hi!
> One way could be to calculate the sequence and coordinates in Excel
> or something similar. If the points are regularly spaced of course.
> Then save to csv, import in QGIS and save to whatever.

  That can be a great idea.

  In my problem all a have to start is a polygon, not necessarily
regular, and the directions and spacing of the lines.  The lines
in the
grid doesn't have to be orthogonal and almost never NS/EW.

  That seems to be a little cumbersome for an excel spreadsheet.  🤔🤔



>
> Cheers!
>
> Karl-Magnus Jönsson
>
>
> -Ursprungligt meddelande-
> Från: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org
<mailto:qgis-user-boun...@lists.osgeo.org>] För
> Fernando M. Roxo da Motta Skickat: den 2 maj 2019 02:16
> Till: qgis-user@lists.osgeo.org <mailto:qgis-user@lists.osgeo.org>
    > Ämne: Re: [Qgis-user] How calculate sequential values based on
> spatial pattern
>
> On Wed, 1 May 2019 16:38:41 -0500, Apoyo Carbono
> mailto:ana.mune...@fcgsas.com>> wrote:
>
>
> > Hi!
> > I need your help. I need to Create a numbers sequentially in a
> > "Points shapefile"  with a spacial pattern.
> > For example, the point number 1 start northwestern and the next
> > numbers points will be order from west to east. For the next
row (to
> > South) going from west to east too.
> > And so on, the values points increase to the south. Therefore the
> > last point will be in the southeast.
> > For now I'm doing manual but it is around 1,000 points!
>
>   This looks like a lot to a 3D seismic survey. 🤔🤔🤔
>
>   I had a script for Qgis 2.x that worked well enough to be
useful to
> me.  The points were generated using a grid support. In your case I
> would have a set of EW lines spaced regularly from north to
south, and
> numbered that way.
>
>   During the points generation I had two (among others) attributes
> associated to each point.   The first one was a point number within
> the line and the other the line number.
>
>   The points were generated so that all points with the same point
> number were parallel to another set of line (usually
perpendicular to
> the first one).
>
>   I don't know if this is like you are looking for, the point here
> (pun unintended) were to associate the numbering attribut while
> generating the points.
>
>   Hope this helps.
>
>
> >
> > I hope that you understand my situation. Can you help me? I could
> > send you the shapefile with an example better explained
> >
>
>
>   Roxo
>
> P.S.- It is possible to still have tose set of scripts luking around
> somewhere, they were never ported to 3.X.  They were too horrible to
> begin with.  😇😇








  Roxo

--
 Non luctari, ludare ---+ WYSIWYG
Fernando M. Roxo da Motta mailto:pe...@roxo.org>>
            | Editor?
Except where explicitly stated I speak on my own behalf.| VI !!
                PU5RXO                                  | I see text,
 Quis custodiet ipsos custodes?-+ I get text!

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org <mailto:Qgis-user@lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


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

Re: [Qgis-user] How calculate sequential values based on spatial pattern

2019-05-05 Thread Alexandre Neto
That is actually quite easy using a bit of SQL in a virtual layer. After
all the west to east and north to south is just a matter of adding a X and
a Y fields and order first by X, then by Y.

I am not at my computer now, but when I came back I will try to get you a
ready to use query.

Alex

A qui, 2/05/2019, 17:39, Fernando M. Roxo da Motta 
escreveu:

> On Thu, 2 May 2019 06:52:43 +, Karl Magnus Jönsson
>  wrote:
>
>
> > Hi!
> > One way could be to calculate the sequence and coordinates in Excel
> > or something similar. If the points are regularly spaced of course.
> > Then save to csv, import in QGIS and save to whatever.
>
>   That can be a great idea.
>
>   In my problem all a have to start is a polygon, not necessarily
> regular, and the directions and spacing of the lines.  The lines in the
> grid doesn't have to be orthogonal and almost never NS/EW.
>
>   That seems to be a little cumbersome for an excel spreadsheet.  🤔🤔
>
>
>
> >
> > Cheers!
> >
> > Karl-Magnus Jönsson
> >
> >
> > -Ursprungligt meddelande-
> > Från: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] För
> > Fernando M. Roxo da Motta Skickat: den 2 maj 2019 02:16
> > Till: qgis-user@lists.osgeo.org
> > Ämne: Re: [Qgis-user] How calculate sequential values based on
> > spatial pattern
> >
> > On Wed, 1 May 2019 16:38:41 -0500, Apoyo Carbono
> >  wrote:
> >
> >
> > > Hi!
> > > I need your help. I need to Create a numbers sequentially in a
> > > "Points shapefile"  with a spacial pattern.
> > > For example, the point number 1 start northwestern and the next
> > > numbers points will be order from west to east. For the next row (to
> > > South) going from west to east too.
> > > And so on, the values points increase to the south. Therefore the
> > > last point will be in the southeast.
> > > For now I'm doing manual but it is around 1,000 points!
> >
> >   This looks like a lot to a 3D seismic survey.  🤔🤔🤔
> >
> >   I had a script for Qgis 2.x that worked well enough to be useful to
> > me.  The points were generated using a grid support.  In your case I
> > would have a set of EW lines spaced regularly from north to south, and
> > numbered that way.
> >
> >   During the points generation I had two (among others) attributes
> > associated to each point.   The first one was a point number within
> > the line and the other the line number.
> >
> >   The points were generated so that all points with the same point
> > number were parallel to another set of line (usually perpendicular to
> > the first one).
> >
> >   I don't know if this is like you are looking for, the point here
> > (pun unintended) were to associate the numbering attribut while
> > generating the points.
> >
> >   Hope this helps.
> >
> >
> > >
> > > I hope that you understand my situation. Can you help me? I could
> > > send you the shapefile with an example better explained
> > >
> >
> >
> >   Roxo
> >
> > P.S.- It is possible to still have tose set of scripts luking around
> > somewhere, they were never ported to 3.X.  They were too horrible to
> > begin with.  😇😇
>
>
>
>
>
>
>
>
>   Roxo
>
> --
>  Non luctari, ludare ---+ WYSIWYG
> Fernando M. Roxo da Motta   | Editor?
> Except where explicitly stated I speak on my own behalf.|  VI !!
> PU5RXO  | I see text,
>  Quis custodiet ipsos custodes?-+ I get text!
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] How calculate sequential values based on spatial pattern

2019-05-02 Thread Fernando M. Roxo da Motta
On Thu, 2 May 2019 06:52:43 +, Karl Magnus Jönsson
 wrote:


> Hi!
> One way could be to calculate the sequence and coordinates in Excel
> or something similar. If the points are regularly spaced of course.
> Then save to csv, import in QGIS and save to whatever.

  That can be a great idea.

  In my problem all a have to start is a polygon, not necessarily
regular, and the directions and spacing of the lines.  The lines in the
grid doesn't have to be orthogonal and almost never NS/EW.

  That seems to be a little cumbersome for an excel spreadsheet.  🤔🤔



> 
> Cheers!
> 
> Karl-Magnus Jönsson 
> 
> 
> -Ursprungligt meddelande-
> Från: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] För
> Fernando M. Roxo da Motta Skickat: den 2 maj 2019 02:16
> Till: qgis-user@lists.osgeo.org
> Ämne: Re: [Qgis-user] How calculate sequential values based on
> spatial pattern
> 
> On Wed, 1 May 2019 16:38:41 -0500, Apoyo Carbono
>  wrote:
> 
> 
> > Hi!
> > I need your help. I need to Create a numbers sequentially in a
> > "Points shapefile"  with a spacial pattern.
> > For example, the point number 1 start northwestern and the next
> > numbers points will be order from west to east. For the next row (to
> > South) going from west to east too.
> > And so on, the values points increase to the south. Therefore the
> > last point will be in the southeast.
> > For now I'm doing manual but it is around 1,000 points!  
> 
>   This looks like a lot to a 3D seismic survey.  🤔🤔🤔
> 
>   I had a script for Qgis 2.x that worked well enough to be useful to
> me.  The points were generated using a grid support.  In your case I
> would have a set of EW lines spaced regularly from north to south, and
> numbered that way.
> 
>   During the points generation I had two (among others) attributes
> associated to each point.   The first one was a point number within
> the line and the other the line number.
> 
>   The points were generated so that all points with the same point
> number were parallel to another set of line (usually perpendicular to
> the first one).
> 
>   I don't know if this is like you are looking for, the point here
> (pun unintended) were to associate the numbering attribut while
> generating the points.
> 
>   Hope this helps.
> 
> 
> > 
> > I hope that you understand my situation. Can you help me? I could
> > send you the shapefile with an example better explained
> >   
> 
> 
>   Roxo
> 
> P.S.- It is possible to still have tose set of scripts luking around
> somewhere, they were never ported to 3.X.  They were too horrible to
> begin with.  😇😇








  Roxo

-- 
 Non luctari, ludare ---+ WYSIWYG
Fernando M. Roxo da Motta   | Editor?
Except where explicitly stated I speak on my own behalf.|  VI !!
PU5RXO  | I see text,
 Quis custodiet ipsos custodes?-+ I get text!
 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] How calculate sequential values based on spatial pattern

2019-05-02 Thread Bernd Vogelgesang

Hi,

I think you touch a quiet common problem, and I decided to find a
solution for the last hours (my dog is already very unpatient), cause I
need this also once in a while. All searches for quick solutions ended
without good results.

For the python-freaks, I think this would be a piece of cake, but so far
obviously no one came up with a one-fits-all solution.

So, here we go manually:

First, you have to decide how many "lines" of numbers you want to
generate to get a reasonable result.

In the tool box use "Create" Grid and choose a line grid with a vertical
spacing that will generate to desired amount of lines. for horizontal
spacing choose a big distance so only few vertical lines are generated
(will be deleted anyway). For the grid extend, choose your point layer.

(Alternative way: Draw one line in your first "row" of points and the
use "Array of offset (parallel) lines" from the tool box)

Having that grid, delete the vertical lines, so that you only keep the
horizontal lines that now evenly distribute over your points.

Now, in the tool box, use "Snap points to lines" from the SAGA
functions. This produce a new layer with points, that now sit on those
lines (choose a good search radius!)

To this result layer, add columns for x and y-values. Do this manually
in the field calculator or in the tool box with "Add ccordinates to points"

Now, you unfortunately need a plugin (could not find a working function
in the toolbox for this), cause you will have to reorder your layer by
those two coordinate values, first by y decending (upmost first), and
then x (ascending)

The plugin is called "Sort and Number": 1st field: y (invert), 2nd field
x. The plugin will add a new column "order" to you points.

Now, to get the numbering to your oringinal points, use "join attributes
by field value" to join your original points with the new ordered
snapped points. (Take care that your original points have a unique id
beforehand!)

The resulting layer is now your point layer which can be labeled by the
"order" column.

If you would post a question on this on gis.stackexchange.com , I can
give there an answer with some screenshots as well.

Cheers,

Bernd

Am 01.05.19 um 23:38 schrieb Apoyo Carbono:

Hi!
I need your help. I need to Create a numbers sequentially in a "Points
shapefile"  with a spacial pattern.
For example, the point number 1 start northwestern and the next  numbers
points will be order from west to east. For the next row (to South) going
from west to east too.
And so on, the values points increase to the south. Therefore the last
point will be in the southeast.
For now I'm doing manual but it is around 1,000 points!

I hope that you understand my situation. Can you help me? I could send you
the shapefile with an example better explained

Thanks,

Ana

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

Re: [Qgis-user] How calculate sequential values based on spatial pattern

2019-05-02 Thread Karl Magnus Jönsson
Hi!
One way could be to calculate the sequence and coordinates in Excel or 
something similar. If the points are regularly spaced of course. Then save to 
csv, import in QGIS and save to whatever.

Cheers!

Karl-Magnus Jönsson 


-Ursprungligt meddelande-
Från: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] För Fernando M. Roxo 
da Motta
Skickat: den 2 maj 2019 02:16
Till: qgis-user@lists.osgeo.org
Ämne: Re: [Qgis-user] How calculate sequential values based on spatial pattern

On Wed, 1 May 2019 16:38:41 -0500, Apoyo Carbono
 wrote:


> Hi!
> I need your help. I need to Create a numbers sequentially in a "Points
> shapefile"  with a spacial pattern.
> For example, the point number 1 start northwestern and the next
> numbers points will be order from west to east. For the next row (to
> South) going from west to east too.
> And so on, the values points increase to the south. Therefore the last
> point will be in the southeast.
> For now I'm doing manual but it is around 1,000 points!

  This looks like a lot to a 3D seismic survey.  🤔🤔🤔

  I had a script for Qgis 2.x that worked well enough to be useful to
me.  The points were generated using a grid support.  In your case I
would have a set of EW lines spaced regularly from north to south, and
numbered that way.

  During the points generation I had two (among others) attributes
associated to each point.   The first one was a point number within the
line and the other the line number.

  The points were generated so that all points with the same point
number were parallel to another set of line (usually perpendicular to
the first one).

  I don't know if this is like you are looking for, the point here (pun
unintended) were to associate the numbering attribut while generating
the points.

  Hope this helps.


> 
> I hope that you understand my situation. Can you help me? I could
> send you the shapefile with an example better explained
> 


  Roxo

P.S.- It is possible to still have tose set of scripts luking around
somewhere, they were never ported to 3.X.  They were too horrible to
begin with.  😇😇
-- 
 Non luctari, ludare ---+ WYSIWYG
Fernando M. Roxo da Motta   | Editor?
Except where explicitly stated I speak on my own behalf.|  VI !!
PU5RXO  | I see text,
 Quis custodiet ipsos custodes?-+ I get text!
 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] How calculate sequential values based on spatial pattern

2019-05-01 Thread Fernando M. Roxo da Motta
On Wed, 1 May 2019 16:38:41 -0500, Apoyo Carbono
 wrote:


> Hi!
> I need your help. I need to Create a numbers sequentially in a "Points
> shapefile"  with a spacial pattern.
> For example, the point number 1 start northwestern and the next
> numbers points will be order from west to east. For the next row (to
> South) going from west to east too.
> And so on, the values points increase to the south. Therefore the last
> point will be in the southeast.
> For now I'm doing manual but it is around 1,000 points!

  This looks like a lot to a 3D seismic survey.  🤔🤔🤔

  I had a script for Qgis 2.x that worked well enough to be useful to
me.  The points were generated using a grid support.  In your case I
would have a set of EW lines spaced regularly from north to south, and
numbered that way.

  During the points generation I had two (among others) attributes
associated to each point.   The first one was a point number within the
line and the other the line number.

  The points were generated so that all points with the same point
number were parallel to another set of line (usually perpendicular to
the first one).

  I don't know if this is like you are looking for, the point here (pun
unintended) were to associate the numbering attribut while generating
the points.

  Hope this helps.


> 
> I hope that you understand my situation. Can you help me? I could
> send you the shapefile with an example better explained
> 


  Roxo

P.S.- It is possible to still have tose set of scripts luking around
somewhere, they were never ported to 3.X.  They were too horrible to
begin with.  😇😇
-- 
 Non luctari, ludare ---+ WYSIWYG
Fernando M. Roxo da Motta   | Editor?
Except where explicitly stated I speak on my own behalf.|  VI !!
PU5RXO  | I see text,
 Quis custodiet ipsos custodes?-+ I get text!
 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user