Pages

Monday, June 4, 2012

Colors in ArcGIS symbols


By Aileen Buckley, Mapping Center Lead, and Jeremy Wright, John Cranfill, and Michael Grossman, Product Engineers
Colors in ArcGIS Symbols - Thumbnail
There are three primary building blocks of standard symbols in ArcGIS—fonts, colors, and graphic files. In a previous article, we discussed fonts in ArcGIS symbols, and in an upcoming article we will tackle the issue of pictures. In this article, we discuss colors in ArcGIS symbols, including color models and how they are used to define colors in ArcGIS, and the differences between their color gamuts. We wrap up with a set of tips for working with color in ArcGIS.

Tips for displaying photos in pop-ups


When displaying photos or other images in ArcGIS Online web map pop-ups it’s sometimes the small things that can make a big difference in the user experience. A small project recently completed for the Montgomery Botanical Center is an example of how you can do some minor tweaks to optimize your photos in pop-ups, and put your best pop-up forward.
For this project we received the locations of trees within the Center in a spreadsheet, along with photographs of each tree. The photographs were quite large – over 5 MB each.
In our first iteration we placed the photos at a web location and added a column to our spreadsheet that included the URL to each photo so we could configure them into our pop-up. Here’s the raw pop-up after we first dragged and dropped the spreadsheet onto our map:

MongoDB example code for adding a NoSQL Plug-in data source


On May 2, 2012, in Geodata, by Jonathan Murphy
For customers with large volumes of data, NoSQL databases provide a useful, highly scalable alternative to the traditional RDBMS. Developers can add support for read-only visualization and mapping of NoSQL data sources, such as MongoDB, into ArcGIS.
Plug-in data sources are a long standing method for displaying data in ArcGIS that is stored in non-traditional formats. MongoDB is an open source NoSQL document storage database featuring replication and data partitioning across multiple machines, robust ad hoc query support, and support for spatial indexing of simple points.
Developers can use the example code provided here as a starting point and reference for their own NoSQL plug-in data sources. Using the code sample will require Visual Studio 2010 C#, MongoDB’s .net driver, and the .NET Assemblies for ArcGIS.
Thomas Breed, who supplied the info for this post, talked about Plug-in data sources and MongoDB in the Effective Geodatabase Programming session at this year’s Developer Conference. You can find a video of that session HERE, Flash Gordon to about the 33:30 mark for the spiel on Plug-in data sources.

Writing Unit Tests for Your ArcGIS API for JavaScript Apps

Whether you’re working with an existing application, or you’re planning a new app, unit testing provides an efficient, dependable way to verify that your code functions as expected and ensure that your app’s features work. In a nutshell, unit testing provides an automated way to target, test and validate specific components of an application.
As with most things JavaScript, Dojo has you covered. Specifically, the Dojo Objective Harness (DOH), which ships with Dojo, provides a framework for writing and running unit tests. The ArcGIS API for JavaScript team uses DOH to run unit tests throughout the development process to check that changes made to the API do not break existing functionality, and that new features accomplish their intended purpose. For more background on DOH and to get up to speed on its capabilities, please head over to the Dojo reference guide page for DOH. Please read through that page to get a better understanding of what DOH can do for you.
Now that you’ve had a brief introduction to DOH, let’s talk about how to use it with your custom modules as well as with classes shipped as part of the ArcGIS API for JavaScript. We’ve put up a page showing some simple unit tests that test functionality in a custom module as well as test some functionality in the ArcGIS API for JavaScript. The two tests for the esri.geometry.Extent object were pulled from the JavaScript API’s test suite of over 2,000 tests and are provided as an example of how to write a test that references esri modules. You can also download all of the required files from ArcGIS.com to run the tests locally.
One key change to make when using DOH to test code that references classes from the ArcGIS API for JavaScript is to change the dojoUrl variable to point to the Esri CDN-hosted version of ArcGIS API for JavaScript instead of a locally-hosted or other CDN-hosted version of dojo. Inside a script tag in runner.html, specify window.dojoUrl as the URL to the ArcGIS API for JavaScript:
window.dojoUrl = "http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8";
By default, test modules are specified via a query string parameter called testModule. In the example linked above, the tests.all module is specified. That module rolls up tests from a couple of other modules that contain unit tests. By using modules, DOH allows you to run any number of tests, in any number of modules easily. For instance, to run only the tests in tests.TestModule1, specify that module as the testModule query string parameter. To see the specifics of how the various unit tests are implemented, please download the code from the link above.
Is this more work? Yes. Is it worth the trouble? Absolutely. While writing tests adds to the work required for app development, seeing tests run and pass instills confidence in your application that would otherwise be missing. By writing unit tests for your code, you can be sure that your app’s features and functionality work as expected. When tests are run throughout the development process, you know exactly how changes affect existing code and when things break. Unit tests do not completely replace manual, in-browser testing but they can go a long way to eliminating the majority of that work.
Source ESRI Blog

Touché! Google Plans to Announce Its Own 3D Maps Before Apple


Touché! Google Plans to Announce Its Own 3D Maps Before Apple

The empire strikes back! Yesterday, Google sent out the following invitation to the press for an event next Wednesday, June 6, at 9:30 a.m. PST:
At this invitation-only press gathering, Brian McClendon, VP of Google Maps and Google Earth, will give you a behind-the-scenes look at Google Maps and share our vision. We’ll also demo some of the newest technology and provide a sneak peek at upcoming features that will help people get where they want to go—both physically and virtually. We hope to see you there.
 Read more 

Sunday, June 3, 2012

Excel Spreadsheets and ArcGIS


Source  by  in ArcGIS Desktop
Microsoft Excel is an amazing tool that allows users to store information, perform calculations, link data, and a more. This tool is used by multiple professions and practices in support of day to day tasks to store critical and useful information. As a result GIS users often need to make use of data stored in Excel Spreadsheets to perform their daily duties.
While an Excel spreadsheet can act similar to a traditional database, it is not. A spreadsheet allows users to perform functions within, such as assign equations to individual cells or records, which are not allowed in a database. This additional functionality often causes problems when a GIS User tries to integrate spreadsheets into their workflows and analysis within Esri’s ArcGIS platform. To be successful, they must be aware of the limitations.
ArcGIS Desktop can read data contained in an Excel Spreadsheet if it is properly formatted. ArcGIS tries to treat a spreadsheet like a traditional database table. This means the spreadsheet must be formatted similar to a database table. If it is not, you will experience problems.
With a properly formatted spreadsheet, you are able to do just about anything you can do with a traditional database table in ArcGIS. This includes queries, geocoding, displaying x,y data, joins and relates. One thing you cannot is edit a spreadsheet from ArcGIS.
Excel files are shown in ArcCatalog and the Catalog Window in ArcMap. Each XLS or XLSX file acts like a database. You can expand them to see the individual worksheets and named ranges they contain as if they are individual database tables. Excel worksheets are always shown with a dollar ($) sign at the end of their name in the Catalog tree.
So how do I properly format an Excel Spreadsheet so it works in ArcGIS? Here are some pointers:
1. Remove all columns and rows that are not needed.
2. Make sure each column has a name
3. Ensure each column name is short
        A. Less than 10 characters is what I recommend
        B. 64 characters is the maximum
4. Make sure column names don’t have spaces or special characters (underscores are acceptable)
5. Make sure each column name starts with a letter
6. Values stored in the cells should not exceed 255 Characters
7. Remove title information from the top of the worksheets
8. Keep it simple. Less is better when working with spreadsheets in ArcGIS
 
So how does ArcGIS work with spreadsheets? As I mentioned ArcGIS assumes a spreadsheet is like any other table. It has rules it follows when you access a spreadsheet from within ArcMap or ArcCatalog. The first thing it does determine what will be used for field names. The first non-empty row in an Excel worksheet or named range of cells is used for the field names. In the example shown below, the third row is the first non-empty row and would used as the field names.
So what happens if the first non-empty row does not contain the field names? This is common with most spreadsheets. The first few rows are often used for title information. So what can you do?
The easiest thing to do is delete those rows if possible. If that is not possible, you can define a named range in Excel that references the data you want to treat as the rows and columns of a table. To define a named range, select the area containing the field names and data, and enter a name for this area in the box at the left side of the Excel Formula Bar as shown in the example below.
Named ranges make it easy to access specific data in Excel. You’ll frequently find that Excel files created by financial departments already have named ranges referencing the pertinent tabular data they contain.
So the basic concept to take away from this is that the simpler the spreadsheet the easier it will be to use in ArcGIS. Once you have it in ArcGIS, you can do pretty much anything with it that you can do with a normal database table.

Here is a link to even more information about this topic from Esri-http://www.esri.com/news/arcuser/0312/importing-data-from-excel-spreadsheets.html

Windows 8 Release - Microsoft's tablet-friendly OS


Windows 8

There's a phenomenal amount of change here to discuss, but if you're looking for a quick summary: Windows 8 is a breeze to use. It's tricked out with social networking and synchronization, it's robust enough to handle Photoshop, it gracefully moves from touch to keyboard and mouse, and it's got some top-notch security.
Despite what Microsoft is calling strong interest from hardware manufacturers and developers, however, its impact is still uncertain at best. 

Tour the first Windows 8 beta (screenshots)

1-2 of 17
Scroll LeftScroll Right
Windows 8's predecessor could be summarized in six words: Windows 7 is Vista done right. Windows 8 is a much harder sell for reasons intrinsic to Microsoft itself, its hardware partners, and the whims of consumers.
First, when Windows 8 launches it will be the most ambitious operating system ever, with a workflow that's easy once you learn it, but not necessarily obvious at first blush. Second, more of your Windows 8 experience will be dependent on your hardware than ever before, because it will work on both actual PCs--i.e., desktops and laptops--and tablets.
Last, and this is the one that won't be resolved until Windows 8 starts shipping to consumers in the second half of this year, there's no strong evidence that Windows 8 is what consumers want next. Do people want tablets that aren't made by Apple? Is the tablet more like a larger smartphone, or a thinner laptop? Is there interest in one operating system that offers both casual touch and robust power modes?
Logging on
Windows 8 offers some great log-on options. You can choose to create a local account, but the OS becomes infinitely more useful when you use a Microsoft account. You'll be able to synchronize to it your Windows 8 settings, including Internet Explorer history. This means that when you log in to any other Windows 8 machine with that account, your data will sync, including background settings, address book, other accounts like Facebook and Twitter, e-mail, and instant messaging.
The lockscreen has been enabled to surface content from your apps, including unread emails and calendar appointments.
The lockscreen has been enabled to surface content from your apps, including unread emails and calendar appointments.
(Credit: Microsoft)
App syncing is planned for the Windows Store, too, while the SkyDrive integration can be used for syncing files.
Beyond sync, once you've logged on for the first time you can change your log-in scheme to a PIN or a picture log-in. The picture log-in is quite cool, and lets you set a photo as your log-in background. You can then customize a quick series of drawings on the picture, made up of a line, a circle, and a dot, to log you in.
I was able to choose my photo log-in from my Facebook photos, which I had synced using the native Photos app that comes with Windows 8. The process was easy, and the photo picker tool in Settings connected through the Photos app to provide access to my Facebook account.
In drawing my log-in on the photo, there were times when it worked on the first attempt, and other times that required multiple attempts. This appears to be more related to the hardware than anything else.
A killer feature that's missing is facial recognition log-ins. The better of these apps have been proven resistant to printed photo hacking, and it would extremely useful to have a Webcam recognize your face and log you in without having to physically touch the computer. At least nobody else has this integrated into the operating system yet, but since third parties like KeyLemon and FastAccess have been working on their versions for a while, expect it to arrive in with the big players sooner rather than later.
Navigating Windows 8: Touch
You can navigate around Windows 8 in two ways, and they work well enough that you can use them simultaneously--assuming you're into that kind of torture.
As we've all seen, Windows 8 is highly grope-able. It wants you to touch it, and frankly touch is the easiest way to get around. Unfortunately, at this point the Windows 8 beta doesn't come with a quick tutorial, and although the workflow is easy, it's not necessarily obvious.
This quirky split keyboard works best with thumbs. Think: tablet, held vertically with two hands.
This quirky split keyboard works best with thumbs. Think: tablet, held vertically with two hands.
(Credit: Microsoft)
Windows 8 is all about the edges of the screen. You swipe in from the right edge to reveal the Windows 8 charms. These include the instantly recognizable Search, Share, Start, Devices, and Settings. The Start button returns you to the Start screen, which is what you see after you log in and where Microsoft expects most of your activity to take place. Once you've launched at least one app, you can swipe in from the left edge to return to the last-open app.
You can also perform a U-turn from the left edge. Swipe in a little bit, then swipe back to the edge, and instead of pulling forward the last app you used, you'll get a sidebar of thumbnails of your last six apps. At the bottom-left corner of the thumbnail bar is a thumbnail of the Start screen, providing another way to return "home." So yes, the familiar Start "button" is hidden, but no, it's not hard to get to. It takes about the same effort to get to the Start screen from either edge.
One of Windows 7's better interface features was a split-screen view that you could initiate just by dragging one program's Title Bar to the left or right side of the screen. This has been updated for Windows 8. When you drag an app from the left edge, if you drag it slowly and hold it near either the left or right edge, a vertical separation bar will appear. Once the bar shows up, release the app and it will "snap" to the edge. The screen will be split, with one-third for the app you just dragged over, and two-thirds for the previous app.
Tiles, Microsoft's term for its app icons, are arranged in groups. A long press on a tile will select it, and you can change its position or group from there. You can also pinch to zoom out and get a global view of your groups, or create custom groups by dragging a tile to the right edge and releasing it.
Where the left and right edges are global, the top and bottom edges are for the apps themselves. In Internet Explorer, for example, this means that your location bar is at the bottom, and your tabs are up top. On the Start screen, you can get a list view of all your apps. In Mail, you can set up accounts--including non-Microsoft ones like Gmail, create folders, sync and more.
This worked well in almost all cases. The only one that caused me problems was the Calendar, where about half the time swiping from the left moved me back a day instead of pulling me into my previous app. Again, this could easily be a factor of the demo device Microsoft lent me, a Samsung tablet currently available in stores with Windows 7.
The desktop tile will take you to the desktop view of Windows 8. It's like Windows 7, but with a cooler secret identity.
The desktop tile will take you to the desktop view of Windows 8. It's like Windows 7, but with a cooler secret identity.
(Credit: Microsoft)
The Desktop tile will jump you directly into a Windows 7-style desktop, complete with Recycle Bin, traditional Internet Explorer, Windows Explorer, and taskbar. A keyboard icon next to the system tray forces the Windows 8 soft keyboard to appear, with options for splitting it for vertical orientation, or using a stylus for handwriting recognition. The side edges still work here, though, and it's much more responsive to touch than Windows 7. I was actually quite impressed how even on the older demo hardware that Microsoft lent me, the desktop mode of Windows 8 was incredibly accurate.
Of course, Windows 8's desktop mode is really for easing the transition to the Metro interface. More on that below in the Features section.
Navigating Windows 8: Keyboard and mouse
Because Windows 8 is intended as unified system for both PC and tablet, it works as well with a keyboard and mouse as it does with touch. As with seemingly everything in Windows 8, this too serves two masters. Sure, it gives you the precision required for Photoshop editing or navigating a spreadsheet's cells, but it's also Microsoft waving a big flag that proclaims Windows 8's usefulness. You get touch, mouse-like precision, and keyboard hot keys in Windows 8, Microsoft is saying. If the company could give you a way to interface with the OS via Morse code, that would be in here, too.
Not only do hot keys work, but from what I can tell, all the major hot keys in Windows 7 perform the same functions in Windows 8, as well as some new ones. These include Win+Print Screen to take a screenshot, which then gets automatically saved to your Photos app, or using the Windows key to switch between the Start screen and your last-used app.
One of the best keyboard functions is that you can pull up an app from the Start screen just by beginning to type. It's ridiculously simple and effective: type "ma" when on the Start screen, and a list of apps with "ma" in their name appear in the center of the screen, but on the right you can flip from Apps to Settings to Files that have the same "ma" string.
Not much will happen when you first connect a mouse to Windows 8. As soon as you move the mouse, though, a scroll bar will appear along the bottom edge of the Start screen. You can then use the scroll bar to navigate through your groups, or you can use the scroll wheel for that--so the vertical motion is interpreted by Windows 8 as a horizontal scroll.
Swipe up from the bottom edge of an app and you'll get app-specific controls. In the case of IE 10, this means your URL bar on the bottom and tabs thumbnails on top.
Swipe up from the bottom edge of an app and you'll get app-specific controls. In the case of IE 10, this means your URL bar on the bottom and tabs thumbnails on top.
(Credit: Microsoft)
Move the mouse to the lower-left corner to reveal your Start screen, or the upper-left corner for your most recently visited app. If you then move the mouse alongside the left edge, it will reveal your other most recently used apps.
The mouse has been enabled for apps, too. So in Internet Explorer, for example, a back navigation arrow appears on the left, and a forward nav arrow appears on the right edge. Mouse to the lower-right corner to see the navigation charms, and then mouse up along the edge to use them.
Right-clicking reveals the "app edges," the app-specific options from the top and bottom screen edges, while a button denoted by a magnifying glass on the far right of the scroll bar zooms you in and out of your groups.
If you're on the lock screen, you click and drag it up to reveal the password dialog. It may sound like a lot that's different from the touch workflow, but it's actually quite simple. You can even use the mouse for your picture log-in.
It's impressive how well Microsoft has been able to replicate the touch workflow with the mouse and keyboard. I don't think we've ever seen the two integrated quite like this before. The multiple ways to interface with the interface also will go a long way toward convincing previous Windows owners and perhaps even skeptics that Windows 8 is all that and a bag of chips. Most importantly, though, both work well with your apps.
Features
From social and security to sync, Windows 8 lives on the cusp of what's expected from a modern operating system. And if it's nothing else, Windows 8 is integrated.
Windows 8 is quite the social butterfly. Not only can it shmooze with the best of them, it actually may be the best. If you're looking for an integrated social experience, Windows 8 comes very close to having it all. Unlike iOS, which requires you to dive into apps as if they were buckets of specific information, Windows 8 is broad and expansive. Start screen tiles are natively integrated with your apps; it is impossible to decouple them, and I can't see a reason for why would you want to.
The People app tile will surface recent updates, too.
The People app tile will surface recent updates, too.
(Credit: Microsoft)
Tiles surface information as it comes in, not unlike peering through a window. See what Microsoft did there? So the Mail app previews recent e-mails; the Calendar app shows your next appointment. You can also set this information to surface on your lock screen, although the version of the beta I tested could only surface detailed previews from the Calendar.
Contacts from multiple sources are integrated, too, in the People app. When it recognizes the same contact from different networks, it merges them. I found most merged without fail, although there were some oddities. Physical addresses appear with a link to Bing Maps for quick lookups, and accounts that are added to one app--such as People--cross over to other related apps, like Messaging.
Search is global, and includes data from all your apps that have activated the search hooks. Of course, this being Windows, you can easily tweak those settings.
Although the Windows Store wasn't open at the time this First Take was written, Microsoft has said that Windows 8 will sync apps through the Store. There's also a Live SDK that developers can use to hook into the single sign-on, and the aforementioned SkyDrive for file sync. So as your apps are integrated with each other and Windows 8 as a whole, they are also syncable. Use your Microsoft log-in on any Windows 8 computer, and instantly your apps, settings, files, and browser history will get pulled down.
The beta of Internet Explorer 10 continues on the path dictated by IE 9. IE 9 and 10 are the most standards-compliant versions of Internet Explorer yet, as well as recognized by several sources as extremely good at blocking malware and phishing.
There's also stuff you're likely to never encounter that's protecting you, like Trusted Boot for double-checking system integrity and SmartScreen to protect you from phishing and malware. There are features like XBox Game and XBox Companion apps for pulling XBox content into Windows 8; a new Refresh option that will re-install Windows 8 without deleting your data; and multiple monitor support for showing Start on one screen and the desktop on the other.
Some people may find it jarring that most of the Windows utilities appear in the Windows 8 desktop screen, even when you launch them from the Start screen. Still, Microsoft has made some effort to make them more accessible. The Task Manager, for example, has been redecorated with colors, charts, and tabs.
You can search your apps in Windows 8 by clicking the right-edge Search icon, or just begin typing on a keyboard from the Start screen.
You can search your apps in Windows 8 by clicking the right-edge Search icon, or just begin typing on a keyboard from the Start screen.
(Credit: Microsoft)
As far as default features are concerned, though, Windows 8 beta presents a solid baseline of apps and functionality to get you started. Don't be surprised if hardware manufacturers are allowed to insert their own preferred apps by the time that Windows 8 ships in the second half of this year.
Performance
One important aspect of Windows 8 that I haven't gone in-depth on yet is that it feels quick. You swipe and you're there. Tap and you're there. Mousing around feels just as zippy, and there's a speed and responsiveness to Windows 8 that no other version of Windows has ever had. If there's a third pillar supporting this massive overhaul alongside the integration and the touch interface, it's that Windows 8 zooms.
All of which is even more impressive considering that my demo hardware was a Samsung tablet designed for Windows 7. Shutdown times weren't impressive, taking around a minute. Boot up was blazing, though, taking between 10 and 13 seconds to get to the log-in screen over three cold boots. From the log-in screen to the Start screen took under 3 seconds in each of three cold boots.
Microsoft has said that Windows 8 is designed to sip on battery life. We didn't get the opportunity to benchmark precisely how accurate that claim is, but after heavy daily use for six days straight, I only had to plug in this older-model tablet once a day. It also was good about keeping a charge when unplugged and not in use, something that has not been true of many tablets currently on the market.
It's not all flash and bang in Windows 8. The decidedly unsexy Task Manager has been given a new coat of paint, and is easier to use, too.
It's not all flash and bang in Windows 8. The decidedly unsexy Task Manager has been given a new coat of paint, and is easier to use, too.
(Credit: Microsoft)
Conclusion
It would be beyond shocking if Windows 8 landed like Vista did. This is a tight consumer experience, with features both new and familiar, and in a refreshingly different package. Hardware makers are on-board, Microsoft says developers are investing heavily in it, and it's earning its buzz because there's nothing quite like it out there.
Businesses will probably eat it up, as will some early adopters and, of course, the Windows die-hards. But will it take off with the average consumer? Microsoft has ceded a lot of ground to Apple on the tablet, and even some of my colleagues at CNET are surprised when jumping from Metro to desktop screens. Perhaps most damning of all, very few people are able to understand the concept of the edges without a 10-second tutorial. It's not much, but it's enough that if it goes unaddressed, people will abandon Windows 8.
I think there's room for a third player in the tablet game, and Google has left the door open for a good fight over the No. 2 slot. But I also think that approaching Windows 8 as a larger smartphone, as many people have been doing with tablets, will lead to frustration. It's decidedly not that.
Windows 8 is an attempt to unify the desktop and the tablet. Microsoft has nailed the operating system, given that it didn't have much choice if it wanted to compete in the tablet space. Too much of Windows 8's fate resides on partnerships, though. It depends on hardware, affordability, how closely the pitch to consumers matches the reality of adoption, and, frankly, what Apple does. Ultimately, Microsoft has control over only one of those, and it's only partial control at that.
There's a long, narrow road ahead for Windows 8. It could be the next big thing, but there's not much room for missteps.