[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •[TODO] Background picture
Page 1 of 3

[TODO] Background picture

Posted: 01 Mar 2010 16:30
by L.J.
Hello

Sometimes, graphs, as for example Air traffic network, has an important spatial component, and its representation should not avoid this fact.

One option is to allow to select node coordinates (in pixels or in UTM), and then overlap the network to an image if necesary.

Other option is on background button to allow to select a picture from users hard drive, so users can move its nodes to the desired location.

Thanks for your time!
Luis J.

Re: Background picture

Posted: 02 Mar 2010 00:08
by mbastian
Hi, thanks for your idea.

You're not the first one to suggest this idea. I believe taking in account geographic data in a Layout Algorithm and propose to set a background image would be an excellent plugin.

Do you have some examples or code that deal with UTM-based positioning ? Thanks.

Re: Background picture

Posted: 02 Mar 2010 01:15
by L.J.
Reminding my notes about Geographical information systems, Remote sensing, and so on... To work on UTM, we should georeference the coordinates.

Choose a point in a picture, raster format like bitmap wolud be perfect, and tell the program that that pixel has a given UTM coordinates, then choose another pixel and repeat. In this way, with few points, then you can add another point (with its coordinates given in a file format or whatever) and triangulate its position with the previous points.

I know the mechanism in a theoretical way, but I have allways used ArcGIS and Idrisi software... sorry, but are som openGIS programs with peopple that can help to adress this question.

Anyway, working on columns rows of pixels as coordinates system is a great start, and I'm sure that GIS software can make the conversion from UTM to pixels.

In the drag & place option, would be great if with the right button you could choose to associate the node to that location (X,Y coordinates).

The easiest thing could be to set a background picture and do the job in a manual way.

Thanks!
Luis J.

Re: Background picture

Posted: 14 Apr 2010 17:17
by gusy
Hey everybody

Since this is my first post in this forum, I'd like to congratulate the developers of gephi for the great job they did.

I'm student in Telecomunications making my diploma thesis in the topic of complex networks, and in part of my thesis I had to evaluate and test most of grapsh visualization and analysis software, and I do believe gephi is a breakthrough in this field. It combines the usability of cytoscape and the power of Pajek, and includes something new: multi-process system and GL acelerated rendering.

That's why I chose gephi as the platform I'm going to develope some plugins. My research is funded by Orange (France Telecom Spain) and they are interested in developing georeference tools for networks, (that's why this message is in this thread)

So, the proposed idea in this thread, which is creating a layout able to locate nodes according their coordinates and adding a background image from a map server, I want to make it real.

I've already started to check documentation and reading other posts in this forum, but I'd like to have good communication flow with developers team.For example, there is a request for adding image as background, which is part of my plugin specification. So if someone is already working on that, I'd like to know, so that I won't reinvent the wheel xD

That's it. If anyone wants to join me or at least guide me (some of the developers) it will be more that good for me. I'll work for 2 weeks almost full time in this plugin. I hope I'll have time to finish it.

Re: Background picture

Posted: 15 Apr 2010 21:32
by mbastian
Hi gusy,

Great to hear such good news from you, you may be the first one publishing a plugin to our plugin center!! ;-)

The best is that actually I was already looking for such a layout plugin and I already have some code to share. So you can take a look, most of the work is probably already done, as you have all the infrastructure.

The layout has the following feature:
* When inited, iterates over all columns in the data and looks for "lat", "latitude", "lon" and "longitude" columns. Alternatively, proposes column property editing. Users can select on which column are latitude and longitude.
* Scales and Rotates: It recenters the graph's centroid on 0 to do that well.
* Proportional displacement. For each node, target point is fixed but at each frame it moves only a fraction of displacement. So everything appears smoother.

There is only one big issue, I'm not sure about me geoloc formula... I'm not expert but I'm transforming my latitude/longitude from spherical coordinates to Cartesian and then project it to X/Y only. With my dummy sample dataset, coordinates seems OK but not exactly, as its not enough scaled on X. With some time and concentration I'm sure that could be fixed.

I made my code available on Launchpad. I created a branch from the Gephi trunk with this additional module named GeoLayout. When pulling this branch you just have to open the project in Netbeans, build and run. You can see the branch lp:~mathieu.bastian/gephi/geolayout here. To get it just run

Code: Select all

bzr branch lp:~mathieu.bastian/gephi/geolayout
I made also available the sample dataset, at the root folder. It's named nodesgeo.gdf and has a dozen nodes with lat/lon coordinates in degree.

Later, we could discuss about the background map. I don't currently have an idea how to do this simply :)

Re: Background picture

Posted: 21 Apr 2010 16:06
by gusy
First of all, sorry I'm answering so late, I thought I was suscribed to this thread but I wasn't so I didn't see this reply in my mail inbox, so I didn't see your answer till today.

Anyway, we've been working in different directions, so we're lucky. I've been looking for solve the map image in the background of the graph .I found the best way to do it is implementing a WMS (Web mapping sevice) client which request from a server the map image which contains the nodes in the network (in GIS software, this is called bounding box).

About the trouble with the geodesic formula, no so big. You just have to be compliant with the choosen map projection. Most of the maps (google maps for example, use Mercator projection, whose math are well defined in wikipedia

after some research, (for example I discover Google maps for desktop applications doesn't give you over 640x640 pixels maps, so is not usable for us) I decided to use openStreetmap WMS (http://www.osm-wms.de/) by now, it only provides Europe maps, but the good thing is if I code a plugin for WMS, any other WMS Server can be choosen (maybe could be choosen according user preference or so). Depending on the needs, one maps or others are good (Exampe, Madrid municipality provides WMS services very detailed for madrid streets, and NASA WMS provides very good satelites images for worldwide maps)

Re: Background picture

Posted: 21 Apr 2010 18:20
by admin
Hi,

Just to say that Open Street Map is a beautiful project and a good opportunity for open source softwares to reuse public data. Don't hesitate to contact them as soon as you release!

Re: Background picture

Posted: 22 May 2010 21:44
by L.J.
gusy, I sent to you a private message. I don't know if you saw it.

Re: Background picture

Posted: 02 Jul 2010 16:20
by mortfrog
gusy wrote:Anyway, we've been working in different directions, so we're lucky. I've been looking for solve the map image in the background of the graph .I found the best way to do it is implementing a WMS (Web mapping sevice) client which request from a server the map image which contains the nodes in the network (in GIS software, this is called bounding box).
I was just wondering if you were still pursuing that direction, and how it was going.

Re: Background picture

Posted: 15 Feb 2011 14:34
by vlabatut
hi,
i'd be interested in a layout plugin taking euclidean coordinates as parameters, e.g. (x,y)
the closest i found was this plugin, but here node locations are described in terms of latitude and longitute, though
does anyone know if what i'm looking for exists?
thanks!
vincent