ABOUT THE AUTHOR
POURIA AMIRIAN holds a Ph.D. in Geospatial Information Systems (GIS). Dr. Amirian is a developer and GIS/IT lecturer with extensive experience developing and deploying small to large-scale Geospatial Information Systems. At the moment he is a research fellow of Strategic Research in Advanced Geotechnologies (.
ACKNOWLEDGMENTS
EVEN THOUGH THE AUTHORS NAME is the one that graces the cover of a book, no book is the result of one persons efforts, and Id like to thank a few of the people involved in this one. First and foremost, thanks to John Wiley & Sons for giving me the opportunity to write and providing me such a brilliant team for publishing this book. They were the only people willing to take a risk on an unknown author for the first book on GIS published by Wrox, and for that I will be forever grateful. Thanks to the staff of John Wiley & Sons specifically Tom Dinse, Debbye Butler, Daniel Scribner and Louise Watson, whose watchful eyes saved me from potentially embarrassing mistakes. Thanks also to Chris Webb for getting me started with the book and Ellie Scott for keeping me on track. All of them did a great job of dealing with the frequent changes I made to the book as I was writing.
Id like to thank my technical editor, Alexy Treshenkov, whose efforts made this book far better than it would have been otherwise.
Id also like to thank Dr. Adam Winstanley, head of the Department of Computer Science at the National University of Ireland, Maynooth (NUIM), Dr. Martin Charlton from the National Centre for Geocomputation (NCG) Ireland, and Dr. Jan Rigby, program manager of StratAG (Strategic Research in Advanced Geotechnologies).
My gratitude, also, to those who helped create the .NET Framework, ArcObjects, tools, APIs, libraries, standards, specifications and all the other fun stuff that helps bring the geospatial to the mainstream and make GIS development and programming exciting today.
I would like to thank everyone who bought this book! I sincerely hope you have as much fun reading it as I did writing it, and I hope that you find it to be worth your hard-earned money and that it proves to be an educational and eye-opening experience.
It is time for expressing my feelings that never can be told using words. I am the luckiest person in the whole world because I have the greatest parents. I want to thank them for countless reasons: for always listening patiently, for their constant support, and for always being by my side. Also, I am so grateful to my father- and mother-in-law for all they do for Ana and me. I owe my life to my wife; my unprecedented wife Dr. Anahid Basiri, who saved my life with her love, passion, and patience. In addition to being the first reader of the book, Ana also took the photograph that is on the cover of this book. This is an image of the International Neuroscience Institute (INI).
Last but most definitely not least, we both (Ana and I) appreciate the high level of care and support of all INIs staff, especially Prof. M. Samii, Dr. J. Pieper, Prof. B. Mohammadi, and Prof. A. Samii. The service I got there was more like inspiration rather than just a brain surgery. In fact, the idea of writing this book had been on my mind for several years, but when I was in INI, I promised myself I would write this book, and now I am so happy to make this promise come true. To be honest, I want to thank that brain tumor because after getting rid of it, I started truly living every single moment. My life is now so joyful that if I could go back and choose not to have such a problem, to continue my life as it was, I would definitely choose to have that brain tumor and successful surgery and to enjoy every single moment beside my family as I am doing now.
APPENDIX
Answers to Chapter Exercises
CHAPTER 1
Exercise 1 Solution
WFS enables platform-independent querying and retrieval of geospatial data over the web. Unlike WMS, which returns an image of geospatial data for display purposes, WFS retrieves encoded features that can be edited and spatially analyzed.
Exercise 2 Solution
File geodatabase provides the fastest possible performance among the three formats. In addition, it needs less disk space for storing geospatial data.
Exercise 3 Solution
Viewer, virtual globe, and professional.
CHAPTER 2
Exercise 1 Solution
The best way to create and automate geoprocessing workflows is using Python and ArcPy. However, the real strength and power of Python and ArcPy is executing long and advanced workflows.
Exercise 2 Solution
Desktop Add-Ins provide a declarative model for configuration.
Exercise 3 Solution
The full flexibility can be achieved using ArcObjects SDK (extending ArcObjects). In fact, it is possible to really extend ArcObjects by implementing and extending interfaces, which cannot be done using other methods of ArcGIS customization.
Exercise 4 Solution
Sharing customizations (such as newly created toolbars and commands) in the ArcObjects SDK (Extending ArcObjects) requires creating an installation package. As a result, like any installation it needs administrative permission. All the other models of development of ArcGIS for Desktop applications dont need operating system administrator privileges.
CHAPTER 3
Exercise 1 Solution
The float and double data types have rounding errors. Because the decimal data type holds a larger number of significant digits than either the float or the double data types and it is not subject to rounding errors, it is best suited for scientific calculations inside C#.
Exercise 2 Solution
The System.Int32 or C# int data type provides the fastest possible performance for numeric calculations.
Exercise 3 Solution
Generally, XAML (eXtensible Application Markup Language) is used to define the user interface of WPF applications. It is based on XML and because it is completely declarative, it enables the developer or designer of the user interface to describe the look and feel of the application without any programming.
Exercise 4 Solution
To provide descriptive help about the purpose, parameters, and return value (if any) of methods, you can use XML comments or documentation comments. In order to use the XML or documentation comments, you need to type three slashes ( ///) before the method declaration to insert XML tags for any methods. Then you should provide a description for every tag.
CHAPTER 4
Exercise 1 Solution
Method overloading and method overriding are part of the polymorphism principle. In addition, operator overloading can be considered as another aspect of polymorphism.
Exercise 2 Solution
The System.String or C# string data type is a class. In other words, it is a reference type. In reference types, an assignment operator is used to copy the reference of an object, not the contents of that object. But for the string type the mentioned operator is overloaded to provide value copying functionality.
Exercise 3 Solution
The exception handling block in .NET consists of three related blocks: try, catch , and finally . The finally block is optional. Code inside the finally block is executed whether the exception occurs or not. This allows you to perform cleanup procedures, such as closing a stream, database connection, or releasing any unmanaged resources.
Exercise 4 Solution
ArrayList objects are not strongly typed, meaning that you can add any data type to a single ArrayList object. The flexible nature of the ArrayList class causes many issues when you want to evaluate data from an ArrayList . When data is added to the ArrayList , it is cast to a generic System.Object type. In order to use items inside an ArrayList , you have to cast elements inside the ArrayList back to their proper data type. This is called boxing and unboxing, which reduces performance.
Next page