This is the first of two assignments. It is designed to test
Some basic programming skills
Your understanding of basic shapefile read/write operations usingFiona
Your ability to implement basic spatial analysis methods usingShapely
Download and save the counties dataset as a shapefile. You can get this athttp://193.1.33.31/geoserver/census2011/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=census2011:counties&outputFormat=SHAPE-ZIP
Merge the Dublin local authorities into one and store in a new shapefile. Don't forget to store the attributes as well as the geometry.
Calculate the centroid for Dublin merged and store this in a new shapefile.
Geocode the address of this centroid. You will need to convert the CRS to WGS84. This should be stored in the shapefile you created in the last step.
Store downloaded files likecountiesin their own directory/folder in yourPyCharmproject. Give this a sensible name such as "counties" in this example. By using this scheme you can download it once and use it in different programs.
Store files created such as the merged shapefile and centroid in a separate directory/folder. Name this something like ".cache". The leading "." indicates a hidden directory/folder. This is designed to be sacrificial. You can delete its contents without losing anything of value.
If you show the resulting shapefiles inArcGISorQGISyou can easily verify whether your output is correct.
Create a single.pyfile and submit this. Don't hard code file locations, like "c:\My Documents\Blah\Blah..." as I won't be able to run your code without amending it. Userelativelocations instead.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here