GeoMedia GIS Blog

"A picture is only worth a thousand words. A map may be worth a thousand numbers. But a GIS is worth a thousand tables."

Archive for the ‘Functional Attributes’ Category

HUGE Enhancements to GeoMedia Help Files

Posted by jeffhobbs on October 8, 2009

For a change of pace, I was working with GeoMedia Pro a little today. I was looking to use the REPLACE functional attribute that was introduced in 6.1.6 and had a few questions. So I went into the trusty help looking for the usage, and WOW, things have changed! The initial help appears to be much more organized and logically laid out. For instance, I receive a full description of the functional attribute. Below that each element of the functional attribute is VERY well explained. No more having to hunt and peck through the help just to understand the different elements of the functional attribute…very cool! But now for the best part – the examples. The examples actually push you off to the Intergraph Knowledge Base. Although the information appears to be a part of the Intergraph Knowledge Base that I’ve known about for a long time (and incidentally, that you need to login to access), the link in the help doesn’t require you to login.

When I clicked on the “REPLACE Example” link in the help, I was brought to a page with a whole host of examples. Here’s a copy and paste from the EXAMPLES sections:

Abstract

The following example shows how to use the REPLACE functional attribute.  This applies to GeoMedia products version 6.1.6 and later.

Code Example

REPLACE(“THIS-IS-EXAMPLE-TEXT”, “-”, “ ”) equals THIS IS EXAMPLE TEXT

REPLACE(“THIS-IS-EXAMPLE-TEXT”, “-”, “ ”, 6) equals THIS-IS EXAMPLE TEXT

REPLACE(“THIS-IS-EXAMPLE-TEXT”, “-”, “ ”, 1, 2) equals THIS-IS EXAMPLE-TEXT

REPLACE(“THIS-IS-EXAMPLE-TEXT”, “I%-”, “ ”, 1, 0, TRUE()) equals THIS IS EXAMPLE-TEXT

REPLACE(“THIS-IS-EXAMPLE-TEXT”, “i%-”, “ ”, 1, 0, TRUE()) equals THIS-IS-EXAMPLE-TEXT

Very cool!

A couple of notes:

  1. Since the examples are written on a web page, it’s likely you won’t be able to just copy the example and paste it into the Functional Attributes dialog. You’ll instead need to first paste it into Notepad or some other text editor and clean-up the example. So, if you find your example not working correctly in GeoMedia, make sure to clean it up first.
  2. When I logged into the Intergraph knowledge base directly (as opposed to accessing it through the help), initially I wasn’t able to find the same knowledge base entry. If you’re going to search the knowledge base directly, make sure to choose “(All GeoMedia Products)” under the “Product” section. I chose “GeoMedia and GeoMedia Professional” and didn’t get any records returned. As soon as I chose “(All GeoMedia Products)”, the same knowledge base entry I found in the help was also available in the Knowledge Base result set.
Advertisements

Posted in Functional Attributes, GeoMedia | Tagged: , , | Comments Off on HUGE Enhancements to GeoMedia Help Files

Proportional Circle Maps in GeoMedia

Posted by jeffhobbs on March 26, 2008

Had a very interesting question today on the Directions Magazine GeoMedia list.

Hi fellow ‘GeoMediars‘.
One of my colleagues has asked me about the possibility of doing proportional circles maps in GeoMedia.
Since I don’t know if/how it’s possible, I come once more seeking your help, asking if anyone has ever done this kind of maps?
Best regards
Jorge

There were a few replies. However I did want to highlight one from Phil Hardy as I thought his attached diagrams were very good. He did make sure to let me know that he didn’t create the images himself…so he can’t take all the credit 🙂

1) OK, by Proportional Circle map I assume you mean something like this.

1

2) First, use Functional Attributes to create centerpoints.

2

3) Then use the legend to change the style of the centerpoints.  In this case I assigned size based on the Population attribute.

3

4) And the end result:

4

Simple, but I thought very well diagrammed. It should also be noted that a nice example of this can be seen on the USSample.gws that comes with every version of GeoMedia and GeoMedia Professional  in the GeoWorkspaces folder.

Posted in Functional Attributes, GeoMedia, Intergraph | 4 Comments »

Creating a Hyperlink from a Point in GeoMedia to Windows Live Search

Posted by jeffhobbs on October 15, 2007

For the "long-term readers", I posted an entry on Creating a Hyperlink to Google Maps in GeoMedia a few months ago. Well, Chris Matus sent me an example of linking to Microsoft’s Virtual Earth environment. I’ve modified it slightly to work against the US Sample dataset. This demonstration is using the "USSampleData.gws" geoworkspace. I’ve simply created a functional attribute on the HighwayInterchange feature class (although not terribly useful, it still demonstrates the functionality).

http://maps.live.com/default.aspx?v=2&cp=’+
ROUND(Y(CENTERPOINT(Input.Geometry), TrueMeas, Degree), 6)+’~’+ROUND(X(CENTERPOINT(Input.Geometry), TrueMeas, Degree), 6)+’&style=h&lvl=17&tilt=-90&dir=0&alt=-1000&sp=Point.’+Y(CENTERPOINT(Input.Geometry), TrueMeas, Degree)+’_’+X(CENTERPOINT(Input.Geometry), TrueMeas, Degree)+’_’+Input.ID+”

In Chris’ case, he was using an area feature named "building". That’s why you’re seeing the CENTERPOINT function being used. Additionally Chris is creating a bounding box (also known as a minimum bounding rectangle). That’s why you’re seeing two lat/long pairs. Past those points, he’s using the same logic I used in my Google Maps posting to calculate the latitude and longitude.

So, the http://maps.live.com/default.aspx? is simply calling Microsoft Live. Then he has some parameters he’s calling:

  • V=2
  • Style=h
  • Lvl=17
  • Tilt=-90
  • Dir=0
  • Alt=-10000
  • Sp=Point

Instead of describing the parameters here, I’ll point you to the Microsoft Live help (which by the way, is fantastic). In the help you can search for the different parameters and you should be able to find what they mean and other options quite simply. For instance, Style is actually the map style. Valid arguments here are:

r=Road

a=Aerial

h=Hybrid

o=Birdseye

Just by changing the style I can go from a:

Road Style

http://maps.live.com/default.aspx?v=2&cp=37.604184~-97.310918&style=r&lvl=17&tilt=-90&dir=0&alt=-1000&sp=Point.37.6041843206049_-97.3109183034338_46

to a Hybrid Style (aerial and lines)

http://maps.live.com/default.aspx?v=2&cp=37.604184~-97.310918&style=h&lvl=17&tilt=-90&dir=0&alt=-1000&sp=Point.37.6041843206049_-97.3109183034338_46

As a whole, I really like the Microsoft Live Search Maps application. It’s extremely functional and really offers a lot of nice bells and whistles. In fact, you can even get into 3D rendering of your map. As a whole, it’s a nice and welcome alternative to Google Maps and I’d highly recommend you play with it.

One last note – Chris made a great point when he mentioned that he’s using the functional attribute for a GeoMedia WebMap Publisher application. Since he’s doing that, he actually URL encoding his functional attribute to ensure it works correctly on a web site. So, in the example he gave me, he substituted all "&" with "%26". I changed it back for this demonstration. However if looking to feed this though a web application like GeoMedia WebMap as opposed to GeoMedia/Pro, it would be best to URL encode the function.

Posted in Functional Attributes, GeoMedia, Intergraph | Comments Off on Creating a Hyperlink from a Point in GeoMedia to Windows Live Search

Playing with Functional Attributes

Posted by jeffhobbs on October 4, 2007

I was playing with the DOTDENSITY functional attribute today. Although it’s quite easy to use, I’m not sure how many people have ever actually used it.

It’s defined as "Returns a collection of points that are placed on that area". Basically, you can tell GeoMedia to place a number of dots on a polygon and these number of dots are designed to show density. The more dots, the greater the density. I’ve typically seen this done with populations. So, to make life simple and easy to share with my readers, I did a little playing with the US Sample data set. You can download my geoworkspace from here. The geoworkspace should work fine if you have the US Sample data set in c:\warehouses. If you’ve moved it, just be sure to change the location of the warehouse under Warehouse > Connections.

In short, I normalized the population by dividing the populations for Asians, Blacks, and Whites. I did this by dividing each population by 10,000. This functional attribute looked like ROUND(Input.WHPOP/10000, 0). This was done just to simply reduce the number of dots. After that, I created the functional attribute: DOTDENSITY(Input.Geometry, INT(Output.WHITE)). This simply takes the output from my previous functional attribute that divided the white population by 10,000 (Output.WHITE) and rounded it to the nearest whole number (INT function). After that I feed in the input geometry and the rounded Output.WHITE population into the DOTDENSITY function. The result is a point collection for each of the black, white, and asian populations.

You can take a look at my screenshots of California to see the results:

All of the dots:

White dot = White Population

Black dot = Black Population

Blue dot = Asian Population

White Population

Black Population

Asian Population

Posted in Functional Attributes, GeoMedia, Intergraph | 4 Comments »

New Functional Attributes in GeoMedia Pro 6.1

Posted by jeffhobbs on July 12, 2007

Haven’t had much chance to work with the GeoMedia Pro 6.1 Beta this week. But did want to pass on a list of the new functional attributes and their descriptions – straight out of the GeoMedia Pro 6.1 Release Contents documentation:

ALIGNMENT function

This new function returns the alignment of a text point geometry.

CONVERTTEXTCOLLECTION function

This new function converts a standard text collection composed of single-character and zero-character text point geometries, into a composite text collection representing a single string.

CREATETEXTPOINT function

This new function creates and returns a text point geometry given a point geometry, text string, alignment, and orientation.

DISTANCE function

This new function computes the minimum distance between two geometries.

FORMATATTRIBUTE function

This new function formats an attribute value into a string according to the display format and display precision settings in the extended GeoMedia client metadata for the attribute.  It yields the same presentation of the attribute used throughout the GeoMedia client.  It is applicable only for attributes, not for intermediate expression results or literal operands, as it is dependent upon the attribute metadata.  For other attribute formatting needs, the TEXT function should be used.

MBR function

This new function returns a polygon representing the minimum bounding rectangle of a geometry, orthogonal to the X-axis.

NEWGUID function

This new function creates and returns a unique value of type GUID (globally unique identifier).

NEWLINE constant

This new constant represents a text literal string containing a carriage return and a line feed.

I haven’t had a chance to play with any of them yet. Just reading the descriptions off the top of my head, to me, the three that have the most value are DISTANCE, NEWLINE, and NEWGUID.

For those that use functional attributes – what do you think is the best addition?

Posted in Functional Attributes, GeoMedia 6.1 Beta, Intergraph | 2 Comments »

Creating a Hyperlink from a Point in GeoMedia to Google Maps

Posted by jeffhobbs on July 10, 2007

After spending much of yesterday moving text around, I decided to look at something different today. We have an application showing a myriad of GPS points along with other information. I thought it might be good to provide a hyperlink for each point to Google Maps to provide additional information and functionality like driving directions, routing, etc.

So…time for functional attributes. For those that have used them, they are tremendously powerful. Additionally, there’s quite a few samples in the GeoMedia documentation…that is, if you can find them :-(. I found a number of them in the GeoMedia Professional Help (the .chm). Initially I found an example to calculate latitude and longitude which turned out to be quite the overkill – but cool nonetheless. From the help:


The following example does the same as the previous one except the values are loaded to the same attribute field (that is, Long_Lat) where the longitude and latitude are separated by a comma (Example: -86:41:17.214,34:41:58.884)

FORMATMEAS(X(Input.Geometry, TrueMeas, Radian), FormatType.Angle, DegreesMinutesSeconds, 3)+’,’+FORMATMEAS(Y(Input.Geometry, TrueMeas, Radian), FormatType.Angle, DegreesMinutesSeconds, 3)

This looked cool, but didn’t return lat/long in a format that Google liked. So, I figured before I went and further, I’d need to figure out just what Google Maps DID want. After doing some research, it turns out what it wants is VERY simple. It wants degrees, rounded to six digits after the decimal.

This is the equivalent of going to Tools > Geoworkspace Coordinate System > Units and Formats > Geographic (under Type) and changing the Unit to deg and changing the precision to six digits (.123456).

Then in your precision coordinates bar, make sure Lon, Lat (deg) is selected

After that, I just needed to create the functional attribute. That turned out to be fairly easy (now that I knew what it wanted):

Y(input.gdo_geometry, TrueMeas, Degree) for the longitude and X(input.gdo_geometry, TrueMeas, Degree) for the latitude

After that I just need to added the ROUND() function into the mix to round to six numbers after the decimal:

ROUND(Y(input.gdo_geometry, TrueMeas, Degree), 6)

ROUND(X(input.gdo_geometry, TrueMeas, Degree), 6)

Finally, a wrapped it all into one long string and added the supporting URL specific information:

http://maps.google.com/maps?q=’+ROUND(Y(input.gdo_geometry, TrueMeas, Degree), 6)+’,+’+ROUND(X(input.gdo_geometry, TrueMeas, Degree), 6)

You can also add a one line descriptor of the point that will get pass with the URL. So, my VERY END functional attribute looks like:

http://maps.google.com/maps?q=’+ROUND(Y(input.gdo_geometry, TrueMeas, Degree), 6)+’,+’+ROUND(X(input.gdo_geometry, TrueMeas, Degree), 6)+’+(SIO + Number+’+Input.SIO_NUMBER+’)’

If you make sure to set the functional attribute to output Hypertext as opposed to standard text, the Properties Dialog will have your functional attribute as a hyperlink that can be clicked on and will launch Google Maps in your default browser. The end Properties Dialog will look like this (I’ve erased some of the private information)

When I click on the hyperlink, I get the following in Google Maps:

Try it for yourself: http://maps.google.com/maps?q=37.157914,+-121.9852+(SIO + Number+322879)

Posted in Functional Attributes, GeoMedia, Intergraph | 7 Comments »