itvoyagers (itvoyagers.in ... · itvoyagers (itvoyagers.in) 3 | p a g e select custom delimiters...

18
ITVoyagers (itvoyagers.in) 1 | Page -----------------------------------Nearest Neighbour Analysis----------------------------------- Download the resources from below link. https://drive.google.com/open?id=1bkLuDvCoyB5DwWmsKHjlsBvRxD0hPGko Go to Add Layer > Add Vector Layer… Browse “ne_10m_populated_places_simple.shp” file and click on “Open”.

Upload: others

Post on 02-Mar-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

1 | P a g e

-----------------------------------Nearest Neighbour Analysis-----------------------------------

Download the resources from below link.

https://drive.google.com/open?id=1bkLuDvCoyB5DwWmsKHjlsBvRxD0hPGko

Go to

Add Layer > Add Vector Layer…

Browse “ne_10m_populated_places_simple.shp” file and click on “Open”.

Page 2: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

2 | P a g e

Now add “signif.txt” file, for that go to.

Add Layer > Add Delimited Text Layer…

Browse “signif.txt” file and click on “Open”.

Page 3: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

3 | P a g e

Select “Custom delimiters” check “Tab” and “Use spatial index” checkbox and

set “X field” and “Y field” values to “LONGITUDE” and “LATITUDE” respectively.

If QGIS ask for CRS then select “EPSG:4326”.

Page 4: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

4 | P a g e

Now go to

Analysis Tools > Distance Matrix

Select “signif” in Input point layer

“I_D” In Input unique ID field.

“ne_10m_populated_places_simple” in Target point layer

“name” in Target unique ID field and finally click on “Browse” and give name

and path to output file and click on “OK”.

Page 5: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

5 | P a g e

Now add “a_out.csv” file for that go to

Layer > Add Layer > Add Delimiter Layer…

Click on “Browse” and select “a_out.csv” file.

Page 6: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

6 | P a g e

Select “CSV (Comma separated values)” and we don’t want to plot this data we

just want its attribute table, so click on “No geometry (attribute only table)”,

and click on “OK”.

Now open “a_out” layer’s attribute table.

Page 7: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

7 | P a g e

For upcoming operations we require “InputID” attribute.

Now go to “signif” layer’s properties.

Page 8: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

8 | P a g e

Go to “Joins” panel, click on “ ” button.

In joins window select “a_out” in Join Layer, “InputID” in Join Field and “I_D” in

Target field. Click on “OK”.

Page 9: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

9 | P a g e

Click on “Apply” and then “OK”.

Now open “signif” layer’s attribute, we can see new attributes are added.

Page 10: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

10 | P a g e

Now we want copy on “signif” layer, for that just save it and create new layer.

Page 11: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

11 | P a g e

We saved it with name “signif_save”.

Page 12: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

12 | P a g e

Now open “signif_save” layer’s properties.

Go to “General” tab and click on “Query Builder”.

Page 13: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

13 | P a g e

Type “COUNTRY” = ‘MEXICO’ as expression and click on “OK”.

Now open “ne_10m_populated_places_simple” layer’s properties. Go to

“General” tab and click on “Query Builder”.

Page 14: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

14 | P a g e

Type “adm0name”= ‘Maxico’ as expression and click on “OK”.

Page 15: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

15 | P a g e

If your canvas shows blank screen then just

Right click on “ne_10m_populated_places_simple” layer and click on “Zoom to

Layer”.

Now for last operation we need to add “mmqgis” plugin.

Plugins > Manage and Install Plugins…

Page 16: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

16 | P a g e

Once we installed “mmqgis” plugin. Go to

MMQGIS > create > Hub Lines

Page 17: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

17 | P a g e

Now select

“ne_10m_populated_places_simple” in Hub Point Layer,

“name” in Hub ID Attribute,

“signif_save” in Spoke Point Layer,

“a_out_Targ” in Spoke Hub ID Attribute,

Click on “Browse…” to set name and path for output file. Once its set click on

“Save” and then “OK”.

Page 18: ITVoyagers (itvoyagers.in ... · ITVoyagers (itvoyagers.in) 3 | P a g e Select Custom delimiters check Tab and Use spatial index checkbox and set ^X field and Y field _ values to

ITVoyagers (itvoyagers.in)

18 | P a g e

Yes our output is here.