Wednesday, June 24, 2009

Rachel Carson Challenge 2009

This marked the third time I've hiked (not run) the Rachel Carson Challenge. The previous two times were in 2006 and 2008. (I was here in 2007). And of course, this time I aimed to finish on time. The past two times I was coming in right at the time limit at a full run (or I was trying to go at a full run, I was usually with people who got tired faster.

As usual, there was another task being accomplished. Last time, I was trying listen in on a 2M amateur radio (which I could do.) This time, I was running another experiment. I carried a GPS tracker that was connected to a 2M (VHF) transmitter that would broadcast my location on APRS. If all went well, it would be recorded by a digipeater that would record my position and track. All of this using equipment loaned by members of the Pitt Amateur Radio Club.

APRS setup

APRS setup

We began in North Park, going east. So it meant the fast part was at the beginning.

Start sign of the rachel carson

We waited in the dark, punctuated by reflective piping on everyone's shoes and gear, and the flourescent green shirts of the volunteers running the challenge.

Waiting before the challenge

I started out with a group that was part of an exercise club at Pitt, including a couple people from my department. We started out by crossing the stream at the beginning, helped by Mark E. the lead of the trail maintainers. Of course, B. went for a spill, filling the need to get muddy out of the way for the rest.

Moving on out

And it was important not to be concerned about getting muddy, because the trails were very muddy, a remnant of the heavy rains that caused major flooding in Turtle Creek, Pitcairn and Forest Hills earlier in the week (and yours truly was doing damage assessment for the Red Cross.) This slowed down progress through North Park to Route 8 significantly, as the mud sucked on our shoes as we went through.

Rachel Carson photographer at Route 8

Halfway through I met up with S and J, who I trained with for the 2008 Challenge, both of whom had traveled back to Pittsburgh for this.

Three of us at checkpoint 3

As usual, there were the many hills to climb and descend, with the twist that I was going in the opposite direction then I had in the past.

Climbing up

And then we pushed to the end. The clouds that were forecast throughout the day were over the finish at Harrison Hills Park, and as two of us raced through Harrison Hills Park (and made one wrong turn, that I figured out) the rains hit. Just as we got to the Bobwhite shelter, which USED to be the finish point. We pushed through the uphill through last part of the course through a downpour, which turned the trail into a torrent of muddy water. And when we got to the end, we emerged out of the woods to wild cheers of volunteers and other late finishers, who probably were not expecting anyone to navigate their way through the now skies after the setting sun and downpour.

Shoes after the Rachel Carson Challenge

And we were soaking wet, from shoes that were completely inundated with mud pressed in by the current, to clothes that were completely soaked. D, one of the volunteers, gave me a hug, and the water being squeezed out of my clothes was very visible. We wolfed down some burgers, I got a massage and a ride back home that evening.

And the experiment, well, it did not really work. But we knew this would be a problem because of the hills and valleys blocking the radio signal from the digipeater, and all the forest cover that blocks GPS signals. But we have some ideas for the second time we send someone with an APRS transmitter down the trail. All we need to do is find someone crazy enough to do the Rachel Carson Challenge while carrying a radio and GPS tracker . . .

APRS points taken during Rachel Carson challenge

Monday, June 15, 2009

Using shp2pgsql to import Shapefiles to PostGIS

I covered some of this in a previous post on Converting Lat/Long data to PostGIS. But now my problem is to import Shapefiles into PostGIS.

First, why do this. While Shapefiles are good for distributing and looking at data, it is difficult to do any analysis. To do anything, you end up using OGR/GDAL to examine the shapefile and then do something with it. PostGIS takes the spatial and data components of the Shapefile and exposes them in database format, allowing anything that can be done with a database to be done with the Shapefile. In addition, it enables Simple Features for SQL which allows for using set operations on geographic objects (as opposed to only sets). Think of all the Venn diagram pictures back in High School. And other spatial operations that may come to mind when dealing with points, lines and shapes.

The key, of course, is to get the PostGIS database started. So, first, within PostgreSQL, create a database

CREATE DATABASE PA;

Next, load PostGIS onto the database. The first step is to load PL/PGSQL

CREATE LANGUAGE plpgsql;

Next, within the database, load the lwpostgis.sql and spatial_ref_sys.sql into the database. I used the pgAdmin III GUI.

Next, use the shp2pgsql tool The format is:

shp2pgsql [] > .sql

This should be run from the directory with the .shp file. refers to the name of the shapefile. is the name of the table to be created within the database. You can also enter this in schema.tablename form if you want. database name is the name of the database on the local server that it is being entered into. Usual practice is to pipe this to an SQL file that will be read in later (with all the necessary permissions. For option, the common one is to enter the -s of the EPSG (if known).

So, for example, using the NHPN shapefile for Pennsylvania (FIPS: 42), which is to be imported into a database named PACities, in the 'public' schema as the table 'NHPN' with the projection NAG 83 (ft) (Pennsyvania South) EPSG=2272, I get:

shp2pgsql -s 2272 S42NHPN public.NHPN PACities > nhpnImport.sql

And now it is in.

Saturday, June 06, 2009

PSO: Back from China

[Note: Originally posted at the Pittsburgh Symphony Orchestra website. Original here]

My wife and I went to Friday's concert, after a long break while the PSO went on their tour of China. We quickly found the board of pictures from the trip, including the picture of 'No horn' sign among those taken by Chuck Lirrett and Stephanie Tretick.

No Horn

I especially enjoyed it because I had just returned from a trip to China myself, and like Chuck was amused by the "No horn" sign, especially when it was found outside a concert hall or school of music. And during our trip, we encountered a few friends who noted the PSO's appearances in Beijing and Shanghai not long before.

My wife's family has an association with the Tianjin Conservatory of Music, and when visiting the school and various faculty there, we came upon their Wall of Fame, with pictures of illustrious alumni and staff from over the years. And another picture, of some distinguished alumni and friends from the United States who had recently come to teach and inspire the next generation of musicians.

Pittsburgh Symphony in Tianjin

It seems that Adam Liu, Cello and alumni of the Tianjin Conservatory of Music, and a few other PSO friends came to the Tianjin Conservatory of Music ahead of us. We laughed at the many interwoven connections we have in our lives, and how small and how rich our world is.

Wednesday, June 03, 2009

Trip notes: China 2009

An account of my first trip to China to meet my wife's family in Tianjin and friends in Beijing and Shanghai.


Tianjin
Beijing
Shangai
Tianjin Pt 2
Quotes
Conversation topics

I arrived in Beijing on Friday afternoon. On arrival, the plane was inspected by health officials who inspected everyone using a hand held temperature sensor. Those who were flagged where then inspected using a second sensor, which I assume is more accurate. Only after everyone was inspected was the plane cleared to depart. With the swine flu scare in full swing (in the past week Japan had reported over 100 cases) there were three more checkpoints with temperature sensors manned by health inspectors before we reached immigration and customs.

S was waiting for me out of customs, and we went downstairs to take the Tianjin bus. We took that to the Tianjin bus station, and met S's father there who picked us up.

Tianjin bus station

Tianjin



In Tianjin, we spent a lot of time walking around the neighborhood. Her family still lives near the Tianjin Conservatory of Music, which was the center of both her life and her mother (who worked there). So we went to markets in the area, her school (all three campuses), and various shops (including a tea shop her mother frequents, where we had two sets of tastings to pick teas to bring back.) S and her mother are in some pictures on the Conservatory wall of fame in the courtyard.

Tianjin Conservatory of Music, main campus

Tianjin traffic is pretty bad. It is not that it is heavy (Bangkok is much heavier), but the drivers are very aggressive, in the disfunctional Boston way (meaning not the New York aggressiveness that has obvious purpose of people trying to get somewhere, but aggressiveness that is clearly sub-optimal because every expression of aggressiveness probably slows down everyone, including the driver jumping in.) For example, red lights are merely suggestions, drivers tend to view pushing across an intersection against a red light as a legitimate possibility. Which causes cross traffic to stop when they reach him, and invariably the crosser gets trapped in the intersection as cross traffic goes through before he makes it across, trapping everyone else. Also, pedestrians cross anywhere, anytime, secure in the knowledge that Chinese law is punative against drivers who touch pedestrians. In contrast to, say Bangkok where I think every pedestrian is fully aware that they don't count for all that much against a car.

The signs are somewhat odd. Many of the public advisory messages consist of a picture and text. But the picture is of what NOT to do, and you have to read the text to realize this. So you have pictures of cars hitting each other, drivers and phones, drinks, etc. Although my favorite sign does utilize the universal circle and line symbol for No. It is a symbol of a horn, which I find exceptionally funny at the Tianjin Conservatory or the Tianjin Music Hall.

No horns
This one is actually in Shanghai, but there were such signs in Tianjin as well.

We visited S grandmother in the hospital, multiple aunties and uncles. A few cousins.

One morning we went to the morning market nearby where the W family lives. At that hour in the morning, that road is mostly closed. In addition, there are some roads that are closed to vehicles, which leads to a large pack of bicycles like the old days.

In the market you can get all sorts of things. We got car seat covers, socks, some herbs, and breakfast. There was all sorts of fruits, vegetables, fish, meats, housewear, and one guy who seemed to have assorted everything.

One of the more famous restaurants is Go Buli (the english on the sign says 'Go Believe') It is known for its steamed buns. The story of the restaurant is the founder was universally poorly regarded, and even the dogs ('go') did not ('bu') look at him ('li'). But, it has become successful, and these restaurants are found throughout the country and Tianjin is known for its steamed buns.

Bao at Go buli

Beijing



Tianjin Beijing bullet train

We took the bullet train to Beijing. It takes about 1/2 hour and arrives at the Beijing-South railway station. Which somehow lacks an associated subway station. Very inconvenient. We took a bus to the nearest train station, then went to the Forbidden City, under the theory that we should do touristy things on our own instead of subjecting our friends in the area to such things. We took lots of pictures, including a close-up of the Mao portrait at the front wall of the Forbidden City, which seemed to attract the attention of a nearby guard who was apparently satisfied that I was not taking pictures of anything else as we went in.

Closeup of Mao portrait

In the Forbidden City

We had lunch in Dongsi, the neighborhood north and east of the Forbidden City. We were pointed that way by a tea shop worker where we called friends. We went into a little side street (Houjie) and found a noodle place to have noodles.

S's friend lives by the Today Museum of Art, so we went there to hang out at their place. CL's husband, Chen Leiji, played the Guqin at the 2008 Olympic Opening Ceremonies during the Scroll of Chinese Paintings segment.

At Today Art Museum

We had dinner in a restaurant at Apartment #8 along with CL and family, JY (from Northwestern) joined us as well as CL's friends. Very good seafood. Interesting dishes of varying quality from ok to very good.


We stayed at Motel168 by Andinglu station. The next morning, we got buns made at a street stall right next door. Next we went to the subway to go to Olympic Park. But first, we decided to take a detour in a small park along the way. Which turned out to be a fairly long park following a small river that ran through the center of the city. We saw many nanny's with babies and retirees. There was also a saxaphone player, an erhu player, some people doing tai chi, and one group that took over a pavilian to play chinese instruments and sing opera.

Erhu on bridge

We took the train to Olympic park. Line 8 (of course!) was a spur line that went to the park. We took pictures of some public sculpture as well as the Bird's Nest and the Water Cube.

Running in dresses in Olympic park, Beijing

Shiny flight sculpture in Olympic Park, Beijing


Then we went for lunch. First we went to Wangfujing street to look. We had lamb on a stick (where we suspect the vendor cheated us of change. grrr) and coconut. Neither was all that good, although there was some entertainment value at looking at live scorpions on a stick. We ended up eating at Quanjude Roast Duck restaurant, the original Peking duck restaurant. Very good food there.

These scorpions on a stick are still alive and moving

Peking Duck at Quanjude Roast Duck Restaurant in Beijing

Shanghai



Compared to the new Beijing South and the Tianjin train stations, Shanghai's train station seems designed to make taking a trip as hard as possible, with multiple, separate buildings for getting tickets, lines for getting in the station, and multiple wings with waiting areas. And then the Shanghai crowds and subway. This was the first day of the Dragon Boat festival holiday, so there were large crowds at the station. But here as well as on the subway and everywhere else we went, there was an obvious increase in bumps-per-unit-time indicator of social aggressiveness. My best illustration. We had taken a spur line to the transfer point at the end of the line. At the transfer point (the end of the line) we see the people in the station getting ready to get on the train (which is about to empty, since it is the end of the line). And there is no space for all of us to get through. Looking out the door, what follows would be obvious. When the doors open, the whole wall of people outside surges to get in, while everyone in the train trying to get out (which is all of us) surge to get out. And the effect is not dissimilar to a rugby scrum. Right down to my bracing myself for the initial impact. I felt sorry for the poor ai yee behind us, who cried out "aiyaa" as the doors opened and she saw the scrum she needed to get through to get off the train.

Shanghai was with my former roommate S and K and their two sons and two daughters. They live in a complex on Tianshanlu in the west part of the city (by Weininglu station). A in particular seemed to enjoy our visit as she had the unusual experience of having multiple adults with her with no other kids to compete.

After a shower and a bit of rest, S and I took the subway to People's Square. We went to the Shanghai Urban Planning Exhibition Hall, which was dominated by a model of Shanghai, and our introduction to the ubiquious preparations for the 2010 World Expo to be in Shanghai.

Shanghai Urban Planning exhibition city model

Which was indicated in signs and public sculpture all over town. Even in the depths of non-touristy neighborhoods you were faced with the exhortations of 'Better city, Better life' accompanied by the requisite cute mascot.

Better City, Better Life was everywhere

Next we took the bus to the Yuyuan bazaar (by Yuyuan garden). Very crowded. We had lunch in a food court type place right before that. Nothing exceptional. Next we tried to walk on the Bund. But we soon found out that there was construction along the whole way. So a taxi to Pudong was in order.

At Yuyuan Bazaar in Shanghai

We wook a taxi to the Super Brand Mall, near the Oriental Pearl Building. It is the standard 9 story Asian mall catering to the middle class. We walked through there as well as Riverside Park. Dinner was with ST and A at Ding Tai Feng, featuring Xiao Long Tung Bao, their version of steamed buns is characterized by soup inside the bao (meaning you really need to eat the bao whole). ST knows of this from Taiwan, where it was a little hole in the wall. Now, it is something that is moderately upscale in Shanghai and other major cities around the Pacific Rim.

Shanghai Pearl

We went up to the 87th floor of the Grand Hyatt to take a quick look at the Shanghai skyline, then went down to the 54th floor where we stopped for coffee. A was enjoying her extended alone time with daddy well past her normal bedtime. And doing some importing things like teaching her guests how to play a driving game on her phone. (Note: while knowing how to go faster is nice, the next major advance is learning how to go left or right).

The next day, S and I went to Qibao, a water town in the west part of Shanghai. Using our guidebooks and the wonders of the internet, we mapped out a route using a combination of subway and buses to get there. Which was followed by asking many people how to find it. An endeavor in which we teamed up with another local couple who was trying to do the same thing. And when we finally found it, we found that there is now a subway stop, right outside the gate. The line is so new that it did not show up on our guidebook maps. Which shows how fast the place is growing.

Qibao canal town

Qibao is a tourist town. A bit out of the way so not as deadly as Yuyuan Garden, but still close enough to be accessible by public transit (and fewer foreigners). There is a pedestrian mall outside Qibao (where we shopped at a store that was closing globally). At Qibao itself, we got the pass for the touristy spots like the replica merchant house and garden, and the shadow puppet theater.

Qibao cotton merchant garden

Shadow puppets in Qibao

This was most useful as a quiet place to hide from the crowds in the town (which was probably consistant with the original idea). The main part was full of little shops, of pseudo antiques, food (conventional and more interesting), and other stores. And the canal with boats (after all, this is a canal town). The narrow streets of shops made it very crowded with bustling shoppers, yelling merchants hawking their wares. Creating the purely intentional effect of a crowded old time market (as opposed to the modern mall)


We returned to the T's after lunch, and hung out with the kids for watercoloring and pizza. Then it was on the bullet train back to Tianjin.

This time we took a normal sleeper car instead of first class like we did on the way down. It was not terribly crowded. We were thinking of upgrading to first class, but it turned out we had our 6 bed compartment to ourselves, so we stayed. Our conductor was very amused as we were asking her about how that worked, and she found out that I was American (Your husband is American?! Your English must be very good) In comparison to first class, the normal sleepers had 6 beds instead of 4 and no compartment door. The car as a whole was only about 2/3 full, so it was not terribly loud, but the car got cold overnight as people did not close the car door, leading it getting very cold with the wind going through the car. Someone took one of our extra blankets, and in the morning, there was a lot of sniffling going on in our car. I can see why the Chinese are terrified of Swine Flu. If it got into the passenger train system . . . (or either Golden Week *shudder*) They should just include face masks as part of the ticket price here.

Tianjin final



The last stretch in Tianjin was marked by visits with relatives (who wanted to wait until they were sure I was in China long enough to be sure I was not bringing Swine Flu in from the United States). S's mom's birthday (we got her a cake),

Happy Birthday Sushi cake

We met with S's schoolfriend L, who is still at the Tianjin Conservatory of Music, getting ready for her Master's recital. She dragged S's parents along with us for lunch at a restaurant in Tianjin that was notable for the many antiques on display along the walls including bells, many Buddha statues (and one idol that S's mother made a point of stopping by, which was for praying for children).

Ladies at Tianjin Conservatory of Music

We also had a couple trips to the large pedestrian mall in Tianjin, in our ongoing quest to find S qipao suitible for future galas. S's mom knew of many of the older department stores and dress shops along the way. Some of the other prominent stores: a very large number of wedding studios and wedding companies. Several Li-ann sporting goods stores. I think there was one every 100 meters, just to make sure you saw it. To be sure, there were several Adidas and Nike stores too, but Li-ann was pervasive. (Note: whoever setup Walmart here did an excellent job. Ditto Nike's NBA-China marketing account. Those people deserve whatever they make and I hope they got a good bonus as well.)

The view from W's apartment in Tianjin

Visiting Tianjin


QUOTES



Numerous occasions with variations:
When are you going to have kids?

In Beijing:
Look what your friend CL gave me. He played in the Olympics!

To S's mom:
When are you going to America to take care of your grandchildren? (Note: S is an only child)

In Shanghai trying to get to Qibao:
Why are you going to ancient city Qibao instead of the clubs and bars?

Numerous occasions:
He does not look American.

In Shanghai:
ST: We're not going to be contributing to the cause of grandkids. Staying with the T's is worth several months of birth control.

On the train from Shanghai to Tianjin:
He does not look American.
Your husband is American? Your english must be very good.

L in Tianjin:
We have to go to the antiques restaurant. You are our international friend.

I approve. (of me)

Immigration at Dulles International Airport:
What is your profession? (after reviewing my assorted visas)

Conversation topics


When are you going to have kids?

How fast buildings are going up in Tianjin/Beijing/Shanghai

How do you like the restaurants in Beijing?

How does the economic downturn affect you?

The trends in quality of Chinese conservatories.

The raising of children in China (AKA the Lang Lang model of parenting AKA why people our age in China don't want kids)

Tianjin's tourist aircraft carrier restaurant (AKA why you do not buy a ship made by russians)

Children's day!

The need to have pretty girls greeting people at stores/restaurants/etc. (AKA when you have 1.5 billion people, it is not too hard to find pretty girls to be greeters/hostesses.)

Global warming (AKA everyone in China believes in Global Warming, because no emporor of China would build his capital in the dessert (Beijing) )