Question

I need help explaining this question. If I have GIS data housed in text files, how...

I need help explaining this question.

If I have GIS data housed in text files, how do I write a python scripts and to create polygons from these files?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

So in Python there are many different tools to store the files and GIS is one of those formats. GIS is a tool in which shapes text file are been stored. There are main three type of text files that are used to make shapes

  • shp
  • .shx
  • .dbf

and now in the code we will use geopanda library to work with the vectors and matplotlib.pyplot to plot the graph

and the shape that you will import as will be the Polygon shape file

code example:

import os
import geopandas as gpd
import matplotlib.pyplot as plt
import earthpy as et
# Plot data a polygon
plt.ion()
os.chdir(os.path.join(et.io.HOME, 'JET BEANS'))

and then after reading file and through vector you can plot the polygon shape easily.

PLEASE GIVE A THUMBS UP!!!!!!!!!!!

Add a comment
Know the answer?
Add Answer to:
I need help explaining this question. If I have GIS data housed in text files, how...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Python, I need help with glob. I have a lot of data text files and want...

    Python, I need help with glob. I have a lot of data text files and want to order them. However glob makes it in the wrong order. Have: data00120.txt data00022.txt data00045.txt etc Want: data00000.txt data00001.txt data00002.txt etc Code piece: def last_9chars(x):     return(x[-9:]) files = sorted(glob.glob('data*.txt'),key = last_9chars) whole code: import numpy as np import matplotlib.pyplot as plt import glob import sys import re from prettytable import PrettyTable def last_9chars(x):     return(x[-9:]) files = sorted(glob.glob('data*.txt'),key = last_9chars) x = PrettyTable() x.field_names =...

  • Write a python program that prompts the user for the names of two text files and...

    Write a python program that prompts the user for the names of two text files and compare the contents of the two files to see if they are the same. If they are, the scripts should simply output “Yes”. If they are not, the program should output “No”, followed by the first lines of each file that differ from each other. The input loop should read and compare lines from each file. The loop should break as soon as a...

  • I need help with one small part of the following question. I think I know how...

    I need help with one small part of the following question. I think I know how to do all the things the question is asking I just can’t figure out how to get it to open the text file. I tried Filename =input “vacation.txt” but that didn’t open the file. Does the program have to direct it to "find" the program? HERE IS THE COMPLETE QUESTION: Create a Python program that: Opens a file and reads the contents of the...

  • How to implement a textblob for sentiment analysis in python with NLTK. Suppose I have data...

    How to implement a textblob for sentiment analysis in python with NLTK. Suppose I have data and I want to find the polarity of positive and negative accuracy and runtime. I have already seen the examples on finding the sentiment on word. But how do I do it with a whole bunch of text files of positive and negative files. Please explain me and include screen shots. Thanks

  • I need help explaining this question and code: The try-except statements are helpful in handling errors...

    I need help explaining this question and code: The try-except statements are helpful in handling errors that are detected during execution. What are the two categories of errors when debugging code? How can the try-except statements handle errors in Python? Provide a code example that supports your comments...Thanks in advance

  • Are you able to help me by explaining how to import data from a .csv file...

    Are you able to help me by explaining how to import data from a .csv file into MATLAB using the import data wizard? I need to use the 'Generate Function' option in the import data wizard. How do I then call this data in MATLAB? Please help me Thank you

  • Hi, I need help for solving Linux question. . 1.Using the proper text editor, create a...

    Hi, I need help for solving Linux question. . 1.Using the proper text editor, create a shell file called by (your name), your enrollment number, your program and the courses you study. Use the appropriate variables and display the above to the standard output (screen). . 2. Write A Shell Script to perform the following: Display the files and directories Print the date in 24 hour format Display the System id Display the current working directory Print the status of...

  • I'm making a quiz in python and was wondering how I would read different text files...

    I'm making a quiz in python and was wondering how I would read different text files depending on the user For example, the user can pick 'easy', 'medium' or 'hard' and the quiz would loads one of 3 text files depending on what button they clicked. Thanks

  • I need help finding and explaining article from WSJ. I have to use The Wall Street...

    I need help finding and explaining article from WSJ. I have to use The Wall Street Journal to show that markets go from one equilibrium to another over time?

  • . PART 3 – Output matrix data to text files using low-level File I/O What happens...

    . PART 3 – Output matrix data to text files using low-level File I/O What happens when you try to use the dlmwrite function with a delimiter that is more than one character? For example, say we require that the file must have two pipe symbols (I 1) between each value? For this part, you will need to output a magic square to a text file, but you will need to use low-level File I/O functions so that you can...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT