Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

Archive for the ‘Conferences’ Category

Null Archipelago — Null Islands for All Coordinate Reference Systems — revision

Posted by smathermather on September 10, 2014

Ok, I misunderstood… . The Null Island Archipelago is actually meant to be just datum based, i.e. not the 0,0 of every projection, but the 0,0 of every null lat/lon.

CREATE OR REPLACE FUNCTION where_in_the_null (crs integer) RETURNS
geometry AS $$

WITH null_island AS (
	SELECT ST_MakePoint(0,0) AS geom
	),
null_island_crs AS (
	SELECT ST_SetSRID(geom, crs) AS geom FROM null_island
)
SELECT ST_Transform(geom, 4326) FROM null_island_crs

---

DROP TABLE IF EXISTS null_archipelago;

CREATE TABLE null_archipelago AS
SELECT srid, where_in_the_null(auth_srid) FROM spatial_ref_sys
WHERE proj4text LIKE '%longlat%';

null_archipelago_real

 

 

@mizmay Someone suggested & @schuyler tweeted (who? please remind me!) a few weeks ago that each coordinate reference system (CRS) has it’s own Null Island, and therefore there must be a Null Archipelago. This got me thinking — what does that look like?

Enter PostGIS. We’ll create a function, that given an EPSG code will return the 0,0 location for that reference system in the real world. It turns out, this is quite easy.


CREATE OR REPLACE FUNCTION where_in_the_null (crs integer) RETURNS
geometry AS $$

WITH null_island AS (
	SELECT ST_MakePoint(0,0) AS geom
	),
null_island_crs AS (
	SELECT ST_SetSRID(geom, crs) AS geom FROM null_island
)
SELECT ST_Transform(geom, 4326) FROM null_island_crs
 
$$ LANGUAGE SQL VOLATILE;


So, now we need some EPSG codes. To that end, we have one in any PostGIS database.


CREATE TABLE null_archipelago AS
SELECT srid, where_in_the_null(auth_srid) FROM spatial_ref_sys
	WHERE auth_srid > 2000 AND auth_srid < 4904;


Map showing the null archipelago overlayed on the Stamen Watercolor Map

Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.

Posted in Conferences, FOSS4G, FOSS4G 2014 | Tagged: , , | Leave a Comment »

Null Archipelago — Null Islands for All Coordinate Reference Systems

Posted by smathermather on September 10, 2014

@mizmay Someone suggested & @schuyler tweeted (who? please remind me!) a few weeks ago that each coordinate reference system (CRS) has it’s own Null Island, and therefore there must be a Null Archipelago. This got me thinking — what does that look like?

Enter PostGIS. We’ll create a function, that given an EPSG code will return the 0,0 location for that reference system in the real world. It turns out, this is quite easy.

CREATE OR REPLACE FUNCTION where_in_the_null (crs integer) RETURNS
geometry AS $$

WITH null_island AS (
	SELECT ST_MakePoint(0,0) AS geom
	),
null_island_crs AS (
	SELECT ST_SetSRID(geom, crs) AS geom FROM null_island
)
SELECT ST_Transform(geom, 4326) FROM null_island_crs
 
$$ LANGUAGE SQL VOLATILE;

So, now we need some EPSG codes. To that end, we have one in any PostGIS database.

CREATE TABLE null_archipelago AS
SELECT srid, where_in_the_null(auth_srid) FROM spatial_ref_sys
	WHERE auth_srid > 2000 AND auth_srid < 4904;

Map showing the null archipelago overlayed on the Stamen Watercolor Map

Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.

Posted in Conferences, FOSS4G, FOSS4G 2014 | Tagged: , , | Leave a Comment »

FOSS as Folk

Posted by smathermather on September 10, 2014

Let us expand a bit on the theme of Free and Open Source Software as _Folk_ software development, i. e. of the people, for the people, and by the people. When I put together my presentation for FOSS4G Korea 2014, I had elements of this theme in it. I expected I would talk about the relationship between governance and open source software in the context of legitimacy — that one informs the legitimacy of the other, as both operate in that shared space we might call commons and derive their legitimacy from that commons.

As I spoke with Sanghee Shin and other OSGeo folks when I arrived, the concepts really crystalized: Free and Open Source Software is folk software, enabled to be built due to the connectivity available by the medium of the internet, by creators with common purpose and common love. And as _folk_ software, not only will development and support of Free and Open Source Geospatial sofware lend legitimacy to the South Korea’s central government’s initiative in software, but that as commons-based peer production, open source software becomes an open expression of Korean culture, Korean ingenuity, and Korea’s contribution to the broader GeoSpatial world.

From the outset, what I was attempting with the speech was to combine Paul Ramsey’s diagram for commons-based peer production (Love of common interest + inexpensive tools for production + internet = commons-based peer production, i.e. Wikipedia, OpenStreetMap, FOSS software, etc.) with Kate Chapman’s call to action: Geo for All, a call for the widening and deepening of the pool of contributors and users of GeoSpatial data and software. The concept of FOSS as Folk happens to do just this thing, and hints at some of the challenges before us in making FOSS accessible.

But, the question of _folk_ explicitly gives us additional conditions and context for creating an inclusive community. This touches back to Kate Chapman’s call for geo4all — understanding FOSS as Folk explicitly calls us to balance simplicity and elaborateness (석가탑 다보탑), and thus helps us be inclusive, but also gives us traditions and context for implementation.

Let us tie this all together in a sentence or two: FOSS is Folk Software, Folk has legitimacy through inclusive process similar to democratic society, and Folk software can draw on other Folk traditions to achieve the balance of simplicity and elaborativeness that results in software and tools that are inclusive and effective. Finally, looking to Governance and Open Source, the work of South Korea in supporting FOSS for geospatial and initiatives like Code for America, FOSS and democratic processes can draw legitimacy from each other by resourcing the same Commons space.

image

Posted in Conferences, FOSS4G, FOSS4G 2014, FOSS4G Korea | Tagged: , , | 2 Comments »

From Dobongsan to Mount Saint Helens — FOSS4Gs and OpenDroneMap

Posted by smathermather on September 8, 2014

I’ve touched down and started to settle into Tri-Met country not too long after returning from FOSS4G Korea.

Photo of mountain in the Cascades from airplaneThe public transit is great, the city vibrant with the warmth of a small town, and the energy of an enclave in a big city, and it’s also slightly surreal, now that I’m back where I am no longer, as Paul Ramsey put it, functionally illiterate. Functionally illiterate is what I was for a week and a couple of days in Korea, and thinking of it like that, this was the first time since early gradeschool that one could consider me to be that. Fascinating. I recommend being functionally illiterate every now and then. (Quick aside, I started to learn Hangul, the Korean alphabet today, and it is not so bad. It’s very clever and logical, and I’m looking forward to getting deeper into it).

On Friday I unveil the beginnings of OpenDroneMap, an open source project intended address computer vision in the context of geospatial datasets. This is a project at its infancy, so it’s is as much a call to action, a plea for help, and a “Hey, does anyone want to come out and play?” sort of moment. And I do it now, before the project is too far along so that a wide variety of people can, if they are interested, get involved and have a say in structure, direction, and outcomes associated with it.IMG_20140906_231000

So what is it? Well as a starting place, it’s a fork of an existing computer vision framework (https://github.com/qwesda/BundlerTools) that allows one to go from unreferenced arbitrary photos to structured information. It’s intended to make computer vision techniques useful and usable for geospatial professionals.

At a moment when PostGIS is so very mature that it does most everything, the waves of invention and reinvention of geospatial are passing again and again through the C, Java, Python, Javascript, and Go (etc.) communities, it is now that we have new possibilities of rich spatial datasets, from crowd-sourced Google Street View like projects such as Mapillary, to the impending deluge of images from civilian Unmanned Aerial Systems (drones). Sadly, many existing tools in this sphere are hard to use, expensive, and or don’t scale well to large datasets. The aim with ODM is to create a toolkit that is easy to use, Free and Open Source (and thus free to modify and use), and scales well to large use cases and moreover to do so within the context of the broader community through a transparent development process.

ODM then is a toolset to augment and supplement existing, now conventional, geospatial technologies like GPS, and give structure to the vast catalog of unstructured data being collected everyday. (I won’t delve into it here, but the other part of the puzzle is the common archiving of unstructured data, ala OpenStreetMap. More on that later).

Pre and post transformed points compared in single figureIn our previous example, we used the implicit information in photos using Multi-Stereo View analysis to correctly restructure bad GPS information. This is a trivial example but mighty powerful stuff.

Let me frame this with a quick diversion: I was blessed with the opportunity to keynote at FOSS4G Korea. I wrote and practiced a clever speech, I flew there to Seoul, and on my ride into town from the airport had a revelatory conversation with Sanghee Shin, my host, as to the nature and future of FOSS4G in Korea. So, I promptly and humbly re-wrote my speech.

In short, this is what I said in my keynote: the South Korean Government is interested in fostering the best endemic resources of the Korean Peninsula, the minds and talents of it’s people, to do great work in software. We know the South Korea for hardware innovations (Samsung, LG, etc.) and world class internet speeds. They want also to be known for their software innovations. I suggested that endemicity (the characteristic of being endemic), government by the people, and commons-based peer production (like open source), are three arenas heavily overlapping in a common space, and that it is natural for Koreans to embrace Free and Open Source Software as an answer to bringing to bear Korean initiative and creativity in software.

Kombucha stand, Portland, Oregon

Kombucha stand, Portland, Oregon

Or put another way — Open Source software is Folk software. Of, by, and for the people, endemic to the creators and users of that software, and if the Korean Government is interested in endemic Korean software communities, then it is in their interest to sponsor and support Free and Open Source Software development and application.

So, my call to action today is that we as the FOSS4G community embrace and lead the development of tools which structure our unstructured information — that together, we build OpenDroneMap and the host of related tools that will aid us in building common geospatial understanding from unstructured data from the street, from the forest, from the fields, and from the air. Next up — the next generation of GeoSpatial software. I am excited to apply and invent it with you, our next generation of Folk GeoSpatial Software. Please join me.

 

PostScript: Could you hear the crescendo of music in the background? You could? Good. I hope it moved you. If you are at FOSS4G Portland, I hope it moves you to my presentation at 10:30 to 10:55 on Friday in track 5. There will be more crescendoing music. Oh Yes.
PostPostScript: Should OpenDroneMap be part of PostGIS long term? Is that a crazy idea? How about a front end as an extension in QGIS? Come, let’s discuss the madness.PostPostPostScript: I think switching time zones is starting to affect my writing style. Is it better? Worse? Neither better nor worse? Good.PostPostPostPostScript: Goodnight all. 좋은 밤.

Posted in 3D, Analysis, Bundler, Camera Calibration, Conference, Conferences, Image Processing, OpenDroneMap | Leave a Comment »

Bukhansan National Park, Seoul, Pt Two — on to Dobongsan Mountain

Posted by smathermather on September 5, 2014

Fewer words, more pictures this time. On to Dobongsan Mountain. This time, I went through a different entrance just to the north and east of the previous entrance.

DSC05134 DSC05135 DSC05136 DSC05140 DSC05144 DSC05164 DSC05167 DSC05169 DSC05235 DSC05237 DSC05239 DSC05263 DSC05279 DSC05285

Posted in Conferences, FOSS4G Korea, National Park | Tagged: , , | Leave a Comment »

Bukhansan National Park, Seoul, Pt Two — off to the base of Dobongsan Mountain

Posted by smathermather on September 4, 2014

In my previous post on Bukhansan National Park, I had the blessings of a guide, ilJumun Jingwansa, who is a KNPS ranger. My second time in the National Park, I took a subway train by myself to explore. This was a quick hike to familiarize myself with getting to the mountain, rather than an in depth exploration.

Photo along Teheran-ro in Gangam District, Seoul

Photo along Teheran-ro in Gangam District, Seoul

Photo from train while crossing the Han River.

Photo from train while crossing the Han River.

I took a train from my hotel in the Gangnam district to the Dobong Station, which is the closest subway station to Bukhansan National Park.

Photo near Dobong Station

Photo near Dobong Station

One thing that I noticed most everywhere in Seoul was the use of the small narrow spaces along rivers, under expressways, and other nooks and crannies that serve as linear parks with multi-purpose trails connecting them. Next time I am there, I hope to rent a bike and do some serious exploration of these,

From Dobong Station, I wandered up a stream along a multi-purpose trail, passed a narrow band of agriculture, to the foot of the mountain.

This adventure ended up being more about the edges of the city, and how they feather into the edges of the National Park and less about the National Park itself. But, it did give me the confidence to navigate to the Bukhansan and to the base of Dobongsan Mountain.

 

Posted in Conferences, FOSS4G Korea, National Park | Tagged: , , | Leave a Comment »

Bukhansan National Park, Seoul

Posted by smathermather on September 4, 2014

For all the time I spent in the city of Seoul, I was able to make three trips into Bukhansan National Park which is partially inside the boundary of the city. It can be both a remote space, and a space overrun by visitors from the cities around. Seoul contains more the 10 million residents, and the metropolitan region is the third largest in the world with more than 25 million.snapshot of bing map of Bukhansan National Park

The park itself is two mountains, Bukhansan Mountain itself and Dobongsan Mountain, although there are many named peaks along the two ridges. The valley containing the Bukhansanseong fortress divides the two mountains, and is said, due to natural springs, to have had the capacity to hold 50,000 people.

5 Ridges as viewed from the road at the southern end of Bukhansan National Park

Credit: ilJumun Jingwansa

IlJumun Jingwansa was my guide on the south end of Bukhansan Mountain (any history or natural history I get right is due to him — anything wrong is mine). We hiked up onto the side of the Bukhansan of the National Park, between Hyangnobong and Jokduribong peaks. Jingwansa was incredibly knowledgeable about the cultural and natural history, and as we walked and I peppered him with questions which he answered, for biological questions looking up English name equivalents of Latin names where they existed.

Image of side of mountain with Jingwansa

We saw two oaks along the way, Quercus acutissima and Quercus mongolica.

Image of Quercus acutissima acorn

We talked about crows and wildfires, trails, and the difficulty of maintaining the natural resources of a park under the constraints of heavy use and a loving public.

These mountains are made of granite, hard, and warm, and dry on the days I saw them. And they overlook the cities around them. It was here that first understood how mountainous Korea is, and something of the relationship between the Korea people, their mountains and their sea. The Korea National Park Service (KNPS) logo reflects this:

KNPS Logo

KNPS Logo

More soon… .

Posted in Conferences, FOSS4G Korea, National Park | Tagged: , , | Leave a Comment »

And then Steve gets all sentimental…

Posted by smathermather on September 2, 2014

for sweetness in `ls *sappy*`;
do;

It is bittersweet as I leave you, Korea. I did not intend to stay this long, so I do miss my family dearly. As my son started kindergarten, I flew to you, and you welcomed me. You astonished me with hospitality, humor, understanding, and the deep beauty of your people, your language, your Seoul, and your mountains. Thank you for the time and conversation with Tongju Dongjoo who offered me grapes and words on Dobong mountain, for ‘Jim’ who fed me rice cakes, shared his spot in the creek for cooling off hot and tired feet in the valley

image

image

Thank you for the atmospheric scientist and programmer whose hospitality and grace were unmatched. May her purpose and direction continue to unfold before her.

Thanks for the statistician turned Open Source GIS person who listened, translated, and understood.

image

And for the centurion who I will see again soon.

image

It was with these three I ate and drank, talked to at length, and with whom I experienced that elevated hospitality you, Korea, are known for.  These three laughed and cheered as I ate the more difficult seafood (sea worms and urchin shell and all, live squid on ice…) , taught me the fine ceremonies of soju, and so very quickly I came to count as friends.

And so, as I long to be home with my loving family, the parting is bitter and sweet. Is it also sour and salty and umami, or would that strain the metaphor too far?

image

I hope not. Until next time…

done;

Posted in Conferences, FOSS4G Korea | 1 Comment »

FOSS4G Korea 2014, poor GPS photos, and mapillary (part 2 of n)

Posted by smathermather on September 2, 2014

A classic and age old problem in GPS is collecting potentially wonderful data in the field, getting back the office, and realizing a lot of manual scrubbing, data massaging, and other such careful work will need to be done to make the GPS data useful and meaningful. This assumes we can even meaningfully correct it at all.

This is true too (maybe especially) for GPS enabled cameras in canyons and urban canyons. This is a problem we started to explore in https://smathermather.wordpress.com/2014/08/31/foss4g-korea-2014-poor-gps-photos-and-mapillary/

Let’s return to the problem briefly. Were the GPS readings to be consistent and accurate, we should see a relatively straight line of points as the photos were taken along the length of sidewalk on Teheran-Ro in the Gangnam District of Seoul

Figure of raw data points showing anything other than a straight line

In addition to not looking straight, though it is supposed to follow a road, we previously demonstrated that there are a lot of points duplicated where, presumably, the camera was using cached GPS data rather than the latest available at the time of the photo. We can see this density of overlapping points even more clearly using the heatmap tool in QGIS:

Heatmap showing clumping of data points

The clump of red shows a clear issue of overlapping points. As these points are the GPS positions of photographs, we can match features between photographs (using structure from motion) to map out the relative location of these photos to each other. The points in the below figure show the matched points in 3 or more photos, the blue shapes represent camera positions within the scene.

Image of sparse point cloud and relative camera positions

If we look at just the camera locations on a map, we see something like the following:

Figure of camera center points in relative space

For the astute student however, it should not be surprising that the coordinates of these points are not recognizable as any known coordinate system. For example let’s view the X, Y, and Z of the first three points:

id	X	Y	Z
1	-0.357585	-0.390081	-3.48026
2	-0.326079	-0.367529	-3.24815
3	-0.295885	-0.348935	-2.98469
4	-0.272306	-0.334949	-2.79409

This means we require some equation to convert between our unreferenced (but consistent) data to a known coordinate system. To build this equation, we just need to know four things about our data with some certainty — the start point and end point X and Y positions. We will ignore Z for this exercise.

Point 1:
X-Local: -0.357585
X-KUCS: 958632.326047712
Y-Local: 1.29161
Y-KUCS: 958744.221397964

If we remember our trigonometry (or google our trigonometry…) then we’ll be able to solve for our X and Y values independently. For example for X:

X1 = 67.8485 * X + 958657

With that and our Y equation:

Y1 = 27.2400 * Y + 19444469

Now we can transform our local coordinates into the Korean 2000 Unified Coordinate system, and get a much nicer result:

Figure showing corrected camera position points

If we perform a heat map on this output, we’ll see that we have spread out our duplicate geometries to their correct, non-overlapping spacing:

Figure showing corrected camera position heat map

Whew! Now to write some code which does this for us… .

Oh, wait! We forgot the final test. How do they look together (pre and post transformed — post transformed as stars of course):
Pre and post transformed points compared in single figure

But, as we know Google (or in the case of Korea, Naver) is the all knowing authority on where thing are. How does this bear out against satellite imagery?:

Pre and post transformed points compared in single figure with aerial for comparison

Woah! That works for me. Notice, we can even see where I walked a bit to the left side at intersections to move around people and trees.

Posted in 3D, Analysis, Conference, Conferences, FOSS4G Korea | Tagged: , , , , | Leave a Comment »

FOSS4G Korea 2014 and the tale of the three Stephens

Posted by smathermather on August 31, 2014

Much is going on in Korea. It is and will be a place to watch for Open Source GeoSpatial, with the likes of Sanghee Shin and all his local chapter OSGeo compadres leading the charge. FOSS4G Korea was part of Smart Geospatial Expo 2014 this year, and during the expo, Sanghee was awarded a prize from the South Korean president for his work in promoting Open Source geospatial technologies. To hear Sanghee explain it, Korea is very much interested in growing its industries through the minds of their people. The great successes of South Korea in the recent past have not been dependent upon the natural resources of Korea, but the intellectual capital of firms such as LG and Samsung. With this in mind, Korea wants to grow it’s software industries from native seed. Sponsorship of Open Source GeoSpatial technologies will be part of this initiative. It seems that they have the talent, the energy, the love of topic, and now the financial resources to start leading. This will be really fun to watch.

But, for this post, I want to focus on the tale of three Stephens, perhaps an echo of narcissism, but an interesting filter for our post today. Not long before I left for this trip, I contacted Sanghee to ask if there were any parks + GIS folks I could connect with while here to talk. Photo of Mr. Yu, B.J. Jang, and Stephen Mather at Smart GeoSpatial Expo 2014 It turns out, Mr. Byeong-hyeok Yu was presenting at FOSS4G Korea on the use of QGIS for remote sensing for the Korean National Park Service. Mr. Yu is one of two GIS people working at KNPS, the other is with their research branch. Mr. Yu was good enough to invite me to headquarters, give me the overview on smartphone apps, QGIS analyses, UAS (drone) flight work, Google StreetView like trail work (in partnership with Naver maps, I believe), and other cutting edge initiatives they are working on. What FOSSGIS has enabled under Mr. Yu’s stewardship is the ability for not just Mr. Yu to do GIS, but also for him to democratize the process and allow a few hundred of KNPS park rangers to use QGIS on their desktops as well as to be the bearers of the equipment for the trail camera project. I like to think of Mr. Yu as a more bright and energetic version of me. After all, he is a FOSS4Geospatial parks guy. So, we’ll call Mr. Yu Stephen Mather number 2 (I did call this narcissism, right).

But here’s the real reason for the tale of three Stephens. Whoever has studied the history of the National Park Service in the US knows of Stephen Tyng Mather, the borax mining magnate and essential founder of the National Park System, who oversaw the development of 20 National Parks in his short tenure. While visiting the headquarters of KNPS, I was given the privilege of an audience and traditional Korean tea ceremony with tireless servant, Stephen Tyng Mather equivalent, and employee number 1 of Korea NPS, Mr. Young-Deck Park. Mr. Park has seen the KNPS from an idea to 21 parks covering more than 3-percent of Korea’s land area (more than 6% if you include the ocean refuges). In short, I was in the presence of a parks visionary and giant. Stephen Mather number 3. I won’t lie. I had to hold back tears. Oh, and the green tea was the best I have ever had.

To close this post, I’ll show you a view from KNPS’ most beloved, and least remote National Park — Bukhansan, which sits north of the Blue House (Korea’s equivalent of our White House) and partially inside the city of Seoul. At 11 million visitors a year and about 19,000 acres, it is quite popular. I hiked one of the ridges with one of their rangers. More on that in another post.

A view from Bukhansan National Park over Seoul

Posted in Conference, Conferences, FOSS4G Korea | Tagged: , , , , | 1 Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 747 other followers