DjPractLelo 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. djpractlelo-0.2.2/DjPractLelo/resource_loader.py +47 -0
  2. djpractlelo-0.2.2/DjPractLelo/resources/GIS10.docx +0 -0
  3. djpractlelo-0.2.2/DjPractLelo/resources/GIS2.docx +0 -0
  4. djpractlelo-0.2.2/DjPractLelo/resources/GIS3.docx +0 -0
  5. djpractlelo-0.2.2/DjPractLelo/resources/GIS4.docx +0 -0
  6. djpractlelo-0.2.2/DjPractLelo/resources/GIS5.docx +0 -0
  7. djpractlelo-0.2.2/DjPractLelo/resources/GIS6.docx +0 -0
  8. djpractlelo-0.2.2/DjPractLelo/resources/GIS7.docx +0 -0
  9. djpractlelo-0.2.2/DjPractLelo/resources/GIS8.docx +0 -0
  10. djpractlelo-0.2.2/DjPractLelo/resources/GIS9.docx +0 -0
  11. djpractlelo-0.2.2/DjPractLelo/resources/prac 4.txt +94 -0
  12. djpractlelo-0.2.2/DjPractLelo/resources/prac10.txt +183 -0
  13. djpractlelo-0.2.2/DjPractLelo/resources/prac2.txt +84 -0
  14. djpractlelo-0.2.2/DjPractLelo/resources/prac3.txt +60 -0
  15. djpractlelo-0.2.2/DjPractLelo/resources/prac5.txt +50 -0
  16. djpractlelo-0.2.2/DjPractLelo/resources/prac6 wms.txt +38 -0
  17. djpractlelo-0.2.2/DjPractLelo/resources/prac7.txt +63 -0
  18. djpractlelo-0.2.2/DjPractLelo/resources/prac8.txt +143 -0
  19. djpractlelo-0.2.2/DjPractLelo/resources/prac9.txt +173 -0
  20. {djpractlelo-0.2.0 → djpractlelo-0.2.2}/DjPractLelo.egg-info/PKG-INFO +1 -1
  21. djpractlelo-0.2.2/DjPractLelo.egg-info/SOURCES.txt +29 -0
  22. djpractlelo-0.2.2/MANIFEST.in +2 -0
  23. {djpractlelo-0.2.0 → djpractlelo-0.2.2}/PKG-INFO +1 -1
  24. {djpractlelo-0.2.0 → djpractlelo-0.2.2}/pyproject.toml +4 -4
  25. {djpractlelo-0.2.0 → djpractlelo-0.2.2}/setup.py +1 -1
  26. djpractlelo-0.2.0/DjPractLelo/resource_loader.py +0 -35
  27. djpractlelo-0.2.0/DjPractLelo.egg-info/SOURCES.txt +0 -10
  28. {djpractlelo-0.2.0 → djpractlelo-0.2.2}/DjPractLelo/__init__.py +0 -0
  29. {djpractlelo-0.2.0 → djpractlelo-0.2.2}/DjPractLelo.egg-info/dependency_links.txt +0 -0
  30. {djpractlelo-0.2.0 → djpractlelo-0.2.2}/DjPractLelo.egg-info/top_level.txt +0 -0
  31. {djpractlelo-0.2.0 → djpractlelo-0.2.2}/LICENCE +0 -0
  32. {djpractlelo-0.2.0 → djpractlelo-0.2.2}/README.md +0 -0
  33. {djpractlelo-0.2.0 → djpractlelo-0.2.2}/setup.cfg +0 -0
@@ -0,0 +1,47 @@
1
+ from importlib.resources import files
2
+ from pathlib import Path
3
+ import docx # from python-docx
4
+
5
+ # Base resources directory
6
+ BASE_RESOURCES = files("DjPractLelo") / "resources"
7
+
8
+ ALLOWED_EXTENSIONS = (".txt", ".docx")
9
+
10
+
11
+ def get_file(category: str, filename: str) -> Path:
12
+ """
13
+ Get a specific TXT or DOCX file from a category.
14
+ category: 'data_science' or 'soft_computing'
15
+ """
16
+ if not filename.endswith(ALLOWED_EXTENSIONS):
17
+ raise ValueError("Only .txt and .docx files are allowed")
18
+
19
+ return BASE_RESOURCES / category / filename
20
+
21
+
22
+ def list_files(category: str) -> list[Path]:
23
+ """
24
+ List all TXT and DOCX files in a category.
25
+ """
26
+ directory = BASE_RESOURCES / category
27
+ return [p for p in directory.iterdir() if p.suffix in ALLOWED_EXTENSIONS]
28
+
29
+
30
+ def load_txt(filename: str, category: str = "data_science") -> str:
31
+ """
32
+ Read a TXT file and return its content.
33
+ """
34
+ path = get_file(category, filename)
35
+
36
+ with open(path, "r", encoding="utf-8") as f:
37
+ return f.read()
38
+
39
+
40
+ def load_docx(filename: str, category: str = "data_science") -> str:
41
+ """
42
+ Read a DOCX file and return its text.
43
+ """
44
+ path = get_file(category, filename)
45
+
46
+ document = docx.Document(path)
47
+ return "\n".join([p.text for p in document.paragraphs])
@@ -0,0 +1,94 @@
1
+ A]Making a Map, Working with Attributes, Importing Spreadsheets or CSV files Using Plugins,
2
+ Searching and Downloading OpenStreetMap Data
3
+ Ans)
4
+
5
+ Add the layer from layer -> Add layer -> Add vector layer
6
+
7
+ Then select the file IND_adm1.shp
8
+
9
+ Then you will get following output
10
+
11
+ Now go to properties of added shp file
12
+
13
+ Then go to symbology and change the filler color to blank white
14
+
15
+ Then add another vector layer Maharashtra_ administrator.shp
16
+
17
+ similarly add layers of Maharashtra_Coastline.shp, Maharashra_water.shp, Maharashtra_highway.shp… then you get this output in project
18
+
19
+ Then to show label of Maharashra_water.shp
20
+
21
+ Go to lables change it to single lables
22
+
23
+ Then you will get this output in project
24
+
25
+ Then go to New Print Layout and give the name to layout
26
+
27
+ Then you will get with this output and then go to add items and then click on add map option
28
+
29
+ Select the area you need to show the map on the canvas (imp note – before creating layer you need to zoom in the actual layout which you want to create a map for)
30
+
31
+ Then add item -> add picture to add the picture
32
+
33
+ Then output
34
+
35
+ Now add label throw add items
36
+ Then you will get output
37
+
38
+ You will also have these options in label Item properties to change the font size color of label
39
+
40
+ Then output
41
+
42
+ Then to add iso format of current date
43
+
44
+ Then output
45
+
46
+ Now add item -> Add North Arrow (Add the North Arrow)
47
+
48
+ The output you will get
49
+
50
+ Then Add Scale Bar and Add legend
51
+
52
+ Output after adding add scale bar
53
+
54
+ Then you will get output after adding add legend
55
+
56
+
57
+ Importing Spreadsheets or CSV files
58
+
59
+ First go to layers -> Add layer -> add delimited Text Layer
60
+
61
+
62
+ Then add the file and select the point coordinates x field : location.longitude and
63
+ y field : location.latitude
64
+
65
+ OUTPUT
66
+
67
+ Plugins And Searching and Downloading OpenStreetMap Data
68
+
69
+
70
+ Go to manage and Install plugins
71
+
72
+ Install the plugins from Not Installed osm place search, Quickmap search, Quick osm
73
+
74
+ Now after Installing Web -> QuickMapServices -> OSM -> OSM Standard
75
+
76
+ Then a layer will be added in the project
77
+
78
+ Then go to plugins -> OSM Place Search -> OSM place search to open the OSM place search
79
+
80
+ Then you will face with the interface in GUI and then enter your preferred area
81
+
82
+ When you select the area after entering region it will highlight like below
83
+
84
+ Then after that click on this icon
85
+
86
+ Then save the layer which you separated by going to layers -> save as
87
+
88
+ So, you will get this interface
89
+
90
+ Now Change format ESPI Shapefile give a name to the file and CRS to WGS 84
91
+
92
+ And after that you will get Output
93
+ OUTPUT
94
+
@@ -0,0 +1,183 @@
1
+ A. Batch Processing using Processing Framework
2
+
3
+ Step 1:Layer->Add Layer->Add Vector Layer
4
+
5
+
6
+ Step 2:Add vector dataset(add populated places and river lake )
7
+ \
8
+
9
+ Step 3:File added to project
10
+
11
+
12
+ Step 4:Data source manager->Vector data->IND_adm0.shp
13
+
14
+
15
+ Step 5:Result:
16
+
17
+
18
+ Step 6:Vector->Geoprocessing Tools->Clip
19
+
20
+
21
+ Step 7:Vector overlay->Run
22
+
23
+
24
+ Step 8:Batch processing-Clip->Autofill settings->Autofill mode & Parameter to use
25
+
26
+
27
+ Step 9:Repeat step 8
28
+
29
+
30
+ Step 10:2 files added
31
+
32
+
33
+ Step 11-Batch processing logs
34
+
35
+
36
+ Step 12:Output
37
+
38
+
39
+ B.Automating Complex Workflows using Processing Modeler
40
+
41
+ Step 1-Processing > Graphical Modeler >
42
+
43
+
44
+ Step 2-Select Raster Layer at Inputs > Give Description > Ok
45
+
46
+
47
+ Step 3-Output after adding raster input
48
+
49
+
50
+ Step 4-At Algorithms Select Majority/Minority Filter >select raster_input for model input > ok >
51
+
52
+
53
+ Step 5-At Algorithms Select Polygonize > select “Majority/Minority Filter” for input layer > Band number : 1 > Name of Field to create : DN > ok >
54
+
55
+
56
+ Step 6-At Algorithms Select Extract by attribute > select “Polygonize” for input layer > selection attribute : DN > Operator : = > Value : 12 > ok >
57
+
58
+
59
+ Step 7-Output after adding Input and algorithms in model
60
+
61
+
62
+ Step 8-Save the model at default location
63
+
64
+
65
+ Step 9-Layer > Add Layer > Add Raster Layer >
66
+
67
+
68
+ Step 10-Select “LC_hd_global_2001.tif.gz”
69
+
70
+
71
+ Step 11-Output after adding Vector LC_hd_global_2001.tif.gz
72
+
73
+
74
+ Step 12-Processing toolbox->Model->New model
75
+
76
+
77
+
78
+ Step 13-Select “LC_hd_global_2012.tif.gz”
79
+
80
+
81
+ Step 14->New model->Run as batch progress
82
+
83
+
84
+ Step 15-Parameters->Input:LC_hd_global_2001
85
+
86
+
87
+ Step 16:Result
88
+
89
+
90
+ Step 17-Newmodel Log
91
+
92
+
93
+ C.Automating Map Creation with Print Composer Atlas
94
+
95
+ Step 1:Layer->Add layer->Add vector layer
96
+
97
+
98
+ Step 2:vector datasets(wetlands_poly) add to project
99
+
100
+
101
+ Step 3:The file added to project
102
+
103
+ Step 4:Vector dataset(county boundary) added to the project
104
+
105
+
106
+
107
+ Step 5:The file added to the project
108
+
109
+
110
+ Step 6:project->New print Layout
111
+
112
+
113
+ Step 7:create print layout->atlas_demo
114
+
115
+
116
+ Step 8:Add iTem->Add Map
117
+
118
+
119
+ Step 9:The map added to the project
120
+
121
+
122
+ Step 10:View->Panels->allow Atlas
123
+
124
+
125
+
126
+ Step 11:Atlas->select coverage layer(county10)->page name (NAME10)
127
+
128
+
129
+ Step 12:Item properties->allow controlled by Atlas
130
+
131
+
132
+ Step 13:Atlas->Preview Atlas
133
+
134
+
135
+ Step 14:The preview of the atlas page
136
+
137
+
138
+ Step 15:Atlas->Next Feature
139
+
140
+
141
+ Step 16: The preview of the atlas page
142
+
143
+
144
+ Step 17:Add item->Add Label
145
+
146
+
147
+ Step 18:Insert/Edit Expression->string->concat->give the expression
148
+
149
+
150
+ Step 19:increase the size of the font
151
+
152
+
153
+ Step 20:The page with updates
154
+
155
+
156
+ Step 21:Repeat the same steps to add the label
157
+
158
+
159
+
160
+ Step 22:Atlas->Last Feature
161
+
162
+ Step 23:In main window->symbology->Inverted polygons->simple white
163
+
164
+
165
+ Step 24:The file updated in the project
166
+
167
+
168
+ Step 25:The result added to the atlas
169
+
170
+ Step 26:expression builder->id->variables(atlas_featureid)
171
+
172
+
173
+ Step 27:symbology->Rule based->no filters(dbl click)->ok
174
+
175
+ Step 28:The file is updated with the changes
176
+
177
+ Step 29:create the expression and the date is displayed on the atlas
178
+
179
+
180
+ Step 30:The date is displayed on the atlas
181
+
182
+
183
+ Step 31:extracted files are saved to the folder
@@ -0,0 +1,84 @@
1
+ A] Familiarizing Quantum GIS: Installation of QGIS, datasets for both Vector and Raster data,
2
+ Maps.
3
+
4
+
5
+ Step1: Open QGIS-> Select Project→ New Project
6
+ Step2: Select Layer → Create Layer → New Shapefile Layer
7
+ Step 3: Set File name:kudal_area, Select Geometry type:polygoan, Set CRS: EPSG:4326 – WGS 84
8
+ New Field- add column name, set data type and length.
9
+ Step 4: To plot Polygon features -> Select the Polygon Feature from layer -> Click Toggle Editing
10
+ Button → Click on Add Polygon-> set attribute values.
11
+ Step 5: To set Style property -> Right click on layer -> click on control feature Symbology -> select
12
+ pattern or set color -> ok
13
+ Step 6: Right click on layer -> click on control feature labeling -> select Single Labels -> set
14
+ value=area_name ->ok
15
+ Step 7: Repeat same steps to add another polygon layers.
16
+ Step8: Select Layer → Create Layer → New Shapefile Layer
17
+ Step 9: Set File name:roads, Select Geometry type:line, Set CRS: EPSG:4326 – WGS 84
18
+ New Field- add column name, set data type and length.
19
+ Step 10: To plot line features -> Select the line Feature from layer -> Click Toggle Editing
20
+ Button → Click on Add line-> set attribute values.
21
+ Step 11: Right click on layer -> click on control feature labeling -> select Single Labels -> set
22
+ value=area_name ->ok
23
+
24
+ Step 12: To set Style property -> Right click on layer -> click on control feature Symbology -> select
25
+ pattern or set color -> ok
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+ Step 13: Repeat same steps to add another line layers.
41
+ Step 14: Select Layer → Create Layer → New Shapefile Layer
42
+ Step 15: Set File name:schools, Select Geometry type:multipoint, Set CRS: EPSG:4326 – WGS 84
43
+ New Field- add column name, set data type and length.
44
+ Step 15: To plot multipoint features -> Select the multipoint Feature from layer -> Click Toggle Editing
45
+ Button → Click on Add multipoint -> set attribute values.
46
+ Step 16: To set Style property -> Right click on layer -> click on control feature Symbology -> select
47
+ pattern or set color -> ok
48
+ Step 17: Right click on layer -> click on control feature labeling -> select Single Labels -> set
49
+ value=area_name ->ok
50
+ Step 18: Repeat same steps to add another multipoint .
51
+
52
+
53
+ B) Calculating line lengths and statistics
54
+ Add Layer>Add Vector Layer>Source> Addfile (IND_adm.zip )s
55
+
56
+ Topology selection
57
+
58
+
59
+ After adding (IND_adm.zip)
60
+
61
+
62
+ Add Layer>Add Vector Layer->Source->Add file(IND_rrd.zip)
63
+
64
+ Topology selection
65
+
66
+ After adding (IND_rrd.zip)
67
+
68
+
69
+ Opening attribute table
70
+
71
+ Adding new field to attribute table using ‘ field calculator’
72
+ Adding ‘road’ for calculating road length in kilometers(length / 1000)
73
+
74
+
75
+ After adding road field
76
+
77
+
78
+ Using vector analysis tools vector->analysis tools ->basic statistics for fields
79
+
80
+
81
+ Select the field and hit run
82
+
83
+
84
+ View the logs
@@ -0,0 +1,60 @@
1
+ A]Exploring and Managing Raster data: Adding raster layers, raster styling and analysis, raster
2
+ mosaicking and clipping
3
+ Ans)
4
+ Adding Raster layers
5
+
6
+ Add raster layer throw layers -> add Layer -> Add raster layer
7
+
8
+ Give the file of population here in raster dataset
9
+
10
+ OUTPUT
11
+
12
+ Go to property window in the layers of each layer
13
+
14
+ In here change render type to singleband pseudocolor and set max to 240 With it choose a color to apply throw color ramp
15
+
16
+ OUTPUT
17
+
18
+ Go to raster calculator in raster
19
+
20
+ Then give a name to output layer then in raster calculator expression layer2 – layer1 and then make sure checkbox is ticked of add result to project and then click ok
21
+
22
+ Then you will get Output
23
+
24
+ Then go to its properties window by right clicking the layer
25
+
26
+ Then chose render type singleband pseudocolor and interpolation to discrete and choose your colors for no data, negative, positive and netural
27
+
28
+ OUTPUT:
29
+
30
+ Raster mosaicking and clipping
31
+
32
+ go to layer then add layer and add raster layer
33
+
34
+ Then add the file throw raster dataset all .TLF files
35
+
36
+ Then you will get this output
37
+
38
+ Then go to Raster -> miscellaneous -> merge
39
+
40
+ Then you will get this window , add the input layers
41
+
42
+ Then select all TIF Files and Click Run
43
+
44
+ The Output After Run
45
+
46
+ Here we now add layer-> add layer-> add vector layer (TO add the map of india admo.shp)
47
+ `
48
+ Select the file from vector dataset(.shp file)
49
+
50
+ Then you will get this output
51
+
52
+ Then go to properties and then click on simple fill then go to fill style and choose no brush
53
+
54
+ Then apply it and you will get this output
55
+
56
+ Then Go to raster -> Extraction -> clip Raster by Mask Layer
57
+
58
+ Then in Input layer select the merged[EPSG:4326]
59
+
60
+ Then click run and you will get this output
@@ -0,0 +1,50 @@
1
+
2
+ A]Working with attributes, terrain Data
3
+ Ans)
4
+
5
+ Step 1: Open qgis->select project->new project
6
+
7
+ Step 2: Add layer->Add Raster Layer
8
+
9
+ Step 3: Raster Dataset-> 10n060e_20101117_gmted_dsc300
10
+
11
+
12
+ OUTPUT:
13
+
14
+
15
+ Step 4: Raster->Extraction->Clip raster by extent
16
+
17
+
18
+ Step 5: select clipping extent file->draw on map canvas
19
+
20
+ Step 6: drag the area->click on run
21
+
22
+
23
+ OUTPUT:
24
+
25
+
26
+ Step 7: raster->extraction->contour
27
+
28
+ Step 8: input layer(clipped file)->Interval between contour lines(100.00)->attribute name(ELEV)->run
29
+
30
+ OUTPUT:
31
+
32
+ Step 9: right click on layer-> properties->label->single labels->value(ElEV)->apply->ok
33
+
34
+
35
+ Output:
36
+
37
+
38
+ Step 10: right click on contours->open attribute table
39
+
40
+
41
+ Step 11: Attribute Table->click on highest value->zoom map to the selected rows
42
+
43
+
44
+ OUTPUT:
45
+
46
+ Step 12: Raster->Analysis->Hillshade…
47
+
48
+ Step 13: input layer(clipped file)->run
49
+
50
+ OUTPUT:
@@ -0,0 +1,38 @@
1
+ A]Working with Projections and WMS Data
2
+ Ans)
3
+
4
+ Step 1: Open qgis->select project->new project
5
+
6
+ Step 2: layer->Add layer->Add Vector Layer
7
+
8
+ Step 3: select vector dataset->ne_10m_admin0_countries.zip->add
9
+
10
+ OUTPUT:
11
+
12
+ Step 4: right click on layer->layer CRS->set layer CRS
13
+
14
+ Step 5: select North_America_Albers_Equal_Area_conic(ESRI:102008)->ok
15
+
16
+
17
+ OUTPUT:
18
+
19
+ Step 6: Layer->save as
20
+
21
+ Step 7: Format (ESRI Shapefile)->file name->ok
22
+
23
+ OUTPUT:
24
+
25
+
26
+ Step 8: Layer->Add layer->Add Raster Layer
27
+
28
+
29
+ Step 9: Raster Dataset->minisc_gb.zip->add
30
+
31
+ OUTPUT:
32
+
33
+ Step 10: Right click on layer->Layer CRS->Set Layer CRS
34
+
35
+ Step 11: select British National Grid(ESRI:27700)->ok
36
+
37
+
38
+ OUTPUT:
@@ -0,0 +1,63 @@
1
+ A]Georeferencing Topo Sheets and Scanned Maps, Georeferencing Aerial Imagery, Digitizing Map Data
2
+ Ans)
3
+ A. Georeferencing Topo Sheets and Scanned Maps
4
+ Step 1: open new project
5
+
6
+
7
+ Step 2: search Maharastra in OSM place search
8
+
9
+ Output
10
+
11
+ Step 3: Layer->Georeferencer
12
+
13
+ Step 4: File->Open Raster…
14
+
15
+ Step 5: Select maha.jpg image
16
+
17
+ Step 6: setting->Transformation Settings
18
+
19
+ Step 8: Transformation type (Thin Plate Spline)->Target CRS(WGS-84)->Resampling Method (Nearest Neighbour)
20
+
21
+
22
+ B. Georeferencing Aerial Imagery
23
+ Step 9: Select point -> to enter X,Y coordinates click on from map canvas
24
+
25
+ Step 10: after selecting point
26
+
27
+ Step 11: After selecting all point->start the georeferencing
28
+
29
+ Step 12: Right click on layer-> decrease transparency
30
+
31
+ Result:
32
+
33
+ Step 13: Layer->Add layer->Add raster layer
34
+
35
+ Step 14: Raster Dataset (BX24_GeoTifv1-02-clip.tif)->add
36
+
37
+ Output:
38
+
39
+ Step 15: Layer->Create layer->New SpatiaLite Layer
40
+
41
+ Step 16: Database (create one folder of extension .sqlite)->Layer name (anything you want)->Geometry type (Polygon) ->add fields like id and name->ok
42
+
43
+ Step 17: select the area and give value for fields like id and name
44
+
45
+ Output:
46
+
47
+ Step 18: Repeat step 15-17 for all polygons
48
+
49
+ Step 19: Database (create one folder of extension .sqlite)->Layer name (anything you want)->Geometry type (Line) ->add fields like id and name->ok
50
+
51
+ Step 20: select the area and give value for fields like id and name
52
+
53
+ Output:
54
+
55
+ Step 21: Repeat step 19-20 for all Line layers
56
+
57
+ Step 22: Database (create one folder of extension .sqlite)->Layer name (anything you want)->Geometry type (Point) ->add fields like id and name->ok
58
+
59
+ Step 23: select the area and give value for fields like id and name
60
+
61
+ Output:
62
+
63
+ Step 24: Repeat step 22-23 for all Points
@@ -0,0 +1,143 @@
1
+ A]Managing Data Tables and Spatial data Sets: Table joins, spatial joins, points in polygon analysis, performing spatial queries.
2
+ Ans)
3
+ a. Table joins
4
+ Step 1: Layer->Add layer->Add vector layer
5
+
6
+ Step 2: vector datasets (t12013-06-tract.shp)
7
+
8
+
9
+ Output:
10
+
11
+
12
+
13
+ Step 3: Layer->Add layer-> Add Delimited Text Layer
14
+
15
+
16
+ Step 4: file name (tl_2013_06_tract)->Geometry Definition (No geometry)->change the datatype of GEO.id2 to Text(string)
17
+
18
+
19
+ Output:
20
+
21
+ Step 5: Right click on layer->open attribute table
22
+
23
+
24
+ Output:
25
+
26
+
27
+ Step 6: Right click on layer->properties
28
+
29
+
30
+ Step 7: joins-> click on + sign
31
+
32
+
33
+ Step 8: Join layer(ca_track_pop)->join field (GEO.id2)->Target field (GOEID)->ok
34
+
35
+ After Adding:
36
+
37
+
38
+ Step 9: right click on layer-> open attribute table
39
+
40
+
41
+ Output:
42
+
43
+
44
+ Step 10: Right click on layer-> properties
45
+
46
+
47
+ Step 11: symbology->Graduated-> value (ALAND)-> color ramp (blue)-> mode (Equal Interval)->click on classify->apply->add
48
+
49
+ Output:
50
+
51
+ b. Spatial joins
52
+ Step 1: Layer-> Add layer->Add vector layer
53
+
54
+
55
+ Step 2: Vector dataset (OEM_NursingHomes_001)->add
56
+
57
+
58
+ Output:
59
+
60
+
61
+ Step 3: Add second layer (nybb_12c)->add
62
+
63
+
64
+ Output:
65
+
66
+
67
+ Step 4: vector-> Data Management Tools->Join Attributes by location
68
+
69
+
70
+
71
+ Step 5: Join to features in (nybb_12c)-> features they (intersect, overlap, equal)->by comparing to (OEM_NursingHomes_001)->Fields to add(select all )->run
72
+
73
+
74
+ Step 6: Right click on joined layer-> open attribute table
75
+
76
+
77
+ Step 7: click on identify features
78
+
79
+
80
+ Step 8: Select one area
81
+
82
+
83
+
84
+
85
+ c. points in polygon analysis
86
+ step 1: Layer->Add layer->Add vector layer
87
+
88
+
89
+ Step 2: vector datasets (ne_10m_admin_0_countries)->add
90
+
91
+
92
+ Output:
93
+
94
+ Step 3: Layer-> Add layer-> Add Delimited Text Layer
95
+
96
+
97
+ Step 4: file name (earthquakes.csv)->Geometry Definition (Point Coordination)->add
98
+
99
+
100
+ Output:
101
+
102
+
103
+ Step 5: vector-> Analysis Tools->Count points in polygon
104
+
105
+
106
+ Step 6: Polygon (ne_10m_admin_0_countries)->points (earthquakes)->count field name(NUMPOINTS)->run
107
+
108
+ Step 7: right click on count layer->open attribute table->check earthquake count
109
+
110
+
111
+ Step 8: Identify Features
112
+
113
+
114
+ Step 9: Select area where you want to check earthquakes counts
115
+
116
+
117
+ d. performing spatial queries
118
+ step 1: Layer->Add layer->Add vector layer
119
+
120
+ Step 2: vector datasets (ne_10m_populated_places_simple )
121
+
122
+ Output:
123
+
124
+ Step 3: Add another vector layer (ne_10m_rivers_lake_centerlines)->add
125
+
126
+
127
+ Output:
128
+
129
+
130
+ Step 4: vector->Geoprocessing tools->buffer
131
+
132
+ Step 5: Input layer (buffered)->Distance (0.50)->run
133
+
134
+
135
+ Output:
136
+
137
+
138
+ Step 6: vector->Research tools->select by location
139
+
140
+ Step 7: Select features from (Buffered)->where the features(intersect, touch, overlap)->By comparing to the features from (ne_10m_populated_places_simple)->run
141
+
142
+
143
+ Output:
@@ -0,0 +1,173 @@
1
+ A]Advanced GIS Operations 1: Nearest Neighbor Analysis, Sampling Raster Data using Points or Polygons, Interpolating Point Data
2
+ Ans)
3
+
4
+ Nearest Neighbor Analysis
5
+ Step 1:Layer->Add Layer->Add vector layer
6
+
7
+ Step 2:Vector->vector dataset(s)->select populated places file
8
+
9
+ Step 3:The file added to the project
10
+
11
+ Step 4:Layer->Add Layer->Add Delimited text layer
12
+
13
+
14
+ Step 5:Delimited Text->select earthquake file->file format(CSV)->point coordinates(no geometry)->add
15
+
16
+ Step 6:The file added to the project
17
+
18
+
19
+
20
+ Step 7:Vector->Analysis Tools->Distance matrix
21
+
22
+
23
+ Step 8:Distance matrix->Parameters->select input point layer(earthquakes file)->input unique ID Field(select populated places)->taget points(1)
24
+
25
+ Step 9:Distance matrix->Logs
26
+
27
+
28
+ Step 10:The file added to the project
29
+
30
+
31
+
32
+ Step 11:Distance matrix->open attribute table
33
+
34
+ Step 12:Disatnce matrix->Atrribute table
35
+
36
+
37
+ Step 13:earthquakes(right click)->properties->Joins->click(+)->select join layer(distance matrix)->join field(inputID) and target field(location.name)
38
+
39
+
40
+
41
+ Step 14:earthquakes->open attribute table
42
+
43
+ Step 15:Attribute table
44
+
45
+
46
+ Step 16: earthquakes(right click)->properties->source->click query builder
47
+
48
+
49
+
50
+
51
+ Step 17:query builder->select location.name->Japan
52
+
53
+ Step 18:Output of selected field
54
+
55
+ Step 19:Repeat same steps and add sov0name and place Japan
56
+
57
+ Step 20: Output of selected field
58
+
59
+ Step 21:MMQGIS->create->Hub Lines/Distance
60
+
61
+ Step 22:Hub Lines->hub layer(earthquake file)->Hub name field(id)->spoke layer(populated places file)->apply
62
+
63
+ Step 23:Output
64
+
65
+ B. Sampling Raster Data using Points or Polygons
66
+
67
+
68
+ Step 1:Layer->Add layer->Add Raster layer
69
+
70
+ Step 2:Raster->raster dataset(select the file tmax_nohads_float)->add
71
+
72
+ Step 3:The file added to the project
73
+
74
+ Step 4:layer->add layer->add delimited text layer
75
+
76
+ Step 5:Delimited text ->select the file(Gaz ua national)->file format(custom delimeters->Tab)->Geometry definition(point coordinates->x field=INTPTLONG->y field=INTPTLAT)->add
77
+
78
+
79
+ Step 6:The file is added to the project
80
+
81
+ Step 7:open the attribute table of 2013_Gaz_ua_national by right clicking the file
82
+
83
+ Step 8:Plugins->Analyses->Point Sampling Tool
84
+
85
+ Step 9:Point Sampling Tool->select fields(GEOID,NAME,tmax_nohads file)
86
+
87
+ Step 10:The new_layer file is added to the project
88
+
89
+ Step 11:open the attribute table of the new_layer
90
+
91
+ Step 12:Layer->Add Layer->Add vector layer
92
+
93
+ Step 13:Vector->vector dataset(select the 2013_us_county file)->add
94
+
95
+ Step 14:The file added to the project
96
+
97
+
98
+ Step 15:Processing->Toolbox
99
+
100
+
101
+ Step 16:Select zonal statistics
102
+
103
+
104
+ Step 17:Raster Analysis->parameters->input layer(select the us_county file)->raster layer(select the tmax_mohads file)->output prefix(ZS_)->Run
105
+
106
+
107
+ Step 18:Raster Analysis->logs
108
+
109
+ Step 19: The file added to the project
110
+
111
+ Step 20:Open the Attribute table of zonal statistics by right clicking the file.
112
+
113
+
114
+ Step 21:layer properties of zonal statistics->symbology->Graduated->value(ZS_mean)->color ramp (spectral)->classify->apply
115
+
116
+
117
+ Step 22:Output
118
+
119
+ C. Interpolating Point Data
120
+ Step 1:Layer->Add Layer->Add vector layer
121
+
122
+ Step 2: Vector->vector dataset(select the Shapefiles file)->add
123
+
124
+ Step 3:Select items to add->Arlington_soundings and Boundary2004 layers->add layers
125
+
126
+ Step 4:The file added to the project
127
+
128
+ Step 5:Processing->Toolbox
129
+
130
+
131
+
132
+ Step 6:Processing toolbox->TIN interpolation
133
+
134
+
135
+ Step 7:parameters->vector layer(select the Arlington_soundings file)->interpolation attribute(ELEVATION)->method(linear)->click(+)->select output raster size pixel size x= y=3.1000->run
136
+
137
+
138
+ Step 8:TIN interpolation->logs
139
+
140
+
141
+ Step 9:The file added to the project
142
+
143
+
144
+ Step 10:Raster->extraction->clip raster by mask layer
145
+
146
+ Step 11:extraction->parameters->input layer(interpolated)->mask layer(shapefiles)->run
147
+
148
+
149
+ Step 12:extraction->logs
150
+
151
+
152
+ Step 13:The file clipped by removing the extra surface from the sides.
153
+
154
+
155
+ Step 14:layer properties of clipped layer file->symbology->singleband pseudocolor->select the color ramp and click classify->run
156
+
157
+
158
+ Step 15:The properties are applied to the file
159
+
160
+
161
+ Step 16:Raster->extraction->contour
162
+
163
+
164
+ Step 19:extraction->contour->input layer(clipped file)->interval(10)->attribute name(ELEV)->run
165
+
166
+
167
+ Step 20:extraction->contour->logs
168
+
169
+
170
+ Step 21:The contour file is added to the project
171
+
172
+
173
+ Step 22:properties of the contour layer file->labels->single labels->value(ELEV)->run
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DjPractLelo
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: My first Python package
5
5
  Author: DjPractVala
6
6
  Author-email: DjPractVala <youremail@example.com>
@@ -0,0 +1,29 @@
1
+ LICENCE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ setup.py
6
+ DjPractLelo/__init__.py
7
+ DjPractLelo/resource_loader.py
8
+ DjPractLelo.egg-info/PKG-INFO
9
+ DjPractLelo.egg-info/SOURCES.txt
10
+ DjPractLelo.egg-info/dependency_links.txt
11
+ DjPractLelo.egg-info/top_level.txt
12
+ DjPractLelo/resources/GIS10.docx
13
+ DjPractLelo/resources/GIS2.docx
14
+ DjPractLelo/resources/GIS3.docx
15
+ DjPractLelo/resources/GIS4.docx
16
+ DjPractLelo/resources/GIS5.docx
17
+ DjPractLelo/resources/GIS6.docx
18
+ DjPractLelo/resources/GIS7.docx
19
+ DjPractLelo/resources/GIS8.docx
20
+ DjPractLelo/resources/GIS9.docx
21
+ DjPractLelo/resources/prac 4.txt
22
+ DjPractLelo/resources/prac10.txt
23
+ DjPractLelo/resources/prac2.txt
24
+ DjPractLelo/resources/prac3.txt
25
+ DjPractLelo/resources/prac5.txt
26
+ DjPractLelo/resources/prac6 wms.txt
27
+ DjPractLelo/resources/prac7.txt
28
+ DjPractLelo/resources/prac8.txt
29
+ DjPractLelo/resources/prac9.txt
@@ -0,0 +1,2 @@
1
+ recursive-include DjPractLelo/resources *.txt
2
+ recursive-include DjPractLelo/resources *.docx
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DjPractLelo
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: My first Python package
5
5
  Author: DjPractVala
6
6
  Author-email: DjPractVala <youremail@example.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "DjPractLelo"
7
- version = "0.2.0"
7
+ version = "0.2.2"
8
8
  description = "My first Python package"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
@@ -25,6 +25,6 @@ where = ["."]
25
25
 
26
26
  [tool.setuptools.package-data]
27
27
  DjPractLelo = [
28
- "resources/data_science/*.txt",
29
- "resources/soft_computing/*.txt"
30
- ]
28
+ "resources/*.txt",
29
+ "resources/*.docx"
30
+ ]
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="DjPractLelo",
5
- version="0.2.0",
5
+ version="0.2.2",
6
6
  author="DjPractVala",
7
7
  description="My demo Python package",
8
8
  packages=find_packages(),
@@ -1,35 +0,0 @@
1
- from importlib.resources import files
2
- from pathlib import Path
3
-
4
- # Base resources directory
5
- BASE_RESOURCES = files("DjPractLelo") / "resources"
6
-
7
-
8
- def get_txt_file(category: str, filename: str) -> Path:
9
- """
10
- Get a specific TXT file from a category.
11
- category: 'data_science' or 'soft_computing'
12
- filename: must end with .txt
13
- """
14
- if not filename.endswith(".txt"):
15
- raise ValueError("Only .txt files are allowed")
16
-
17
- return BASE_RESOURCES / category / filename
18
-
19
-
20
- def list_txt_files(category: str) -> list[Path]:
21
- """
22
- List all TXT files in a category.
23
- """
24
- directory = BASE_RESOURCES / category
25
- return [p for p in directory.iterdir() if p.suffix == ".txt"]
26
-
27
-
28
- def load_txt(filename: str, category: str = "data_science") -> str:
29
- """
30
- Read a TXT file and return its content.
31
- """
32
- path = get_txt_file(category, filename)
33
-
34
- with open(path, "r", encoding="utf-8") as f:
35
- return f.read()
@@ -1,10 +0,0 @@
1
- LICENCE
2
- README.md
3
- pyproject.toml
4
- setup.py
5
- DjPractLelo/__init__.py
6
- DjPractLelo/resource_loader.py
7
- DjPractLelo.egg-info/PKG-INFO
8
- DjPractLelo.egg-info/SOURCES.txt
9
- DjPractLelo.egg-info/dependency_links.txt
10
- DjPractLelo.egg-info/top_level.txt
File without changes
File without changes
File without changes