Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Geospatial Development Essentials

You're reading from   Python Geospatial Development Essentials Utilize Python with open source libraries to build a lightweight, portable, and customizable GIS desktop application

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781782175407
Length 192 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Karim Bahgat Karim Bahgat
Author Profile Icon Karim Bahgat
Karim Bahgat
Arrow right icon
View More author details
Toc

Weaving functionality into the user interface


Next, let's make the analysis functionality created so far accessible in the user interface of our application.

Layer-specific right-click functions

In Chapter 5, Managing and Organizing Geographic Data, we instructed our application that right-clicking a layer in the LayersPane give us a menu of actions to choose from that is specific to that particular layer. In the current chapter, the only layer-specific functionality we made is the buffer operation. Therefore, we add the buffer menu option to the RightClickMenu_VectorLayer class in app/dialogues.py. Remember to find and save an app/icons/buffer.png icon so that it can be displayed next to the menu's buffer item:

        # Buffering
        def open_options_window():
            window = VectorBufferOptionWindow(self.layeritem, self.layerspane, self.layeritem, statusbar)
        self.imgs["buffer"] = icons.get("buffer.png", width=32, height=32)
        self.add_command(label="Buffer", command...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image