Skip to content
September 28, 2010 / Gagan

Electric Network with Geometric Network

In my last blog “Shortest path with Geometric Network” I had shown that how easily a road network can be created with GeometricNet library. We can also find the shortest path as well using A-star algorithm.

Now I have created a example for electrical network. Here a existing network of power distribution is loaded in the window along with many network creation tools. Functionality of utility network are simulated here with this examples. Like a distribution  line can not start from substation, only high voltage line can start.  Another constraint is  from a pole one can take fixed number connections, so I have consider four and only four line can be drawn ‘to’ connection points. As electrical network is directed network, so a line can not be drawn ‘from‘  connection point to pole. There are many other Utility GIS functionalities are implemented like while drawing edge (electrical line /wire ) default end node (poles / network element ) , splitting the edge if another edge touch the same and check the edge to edge snapping rule. Please explore the more in the example.

I am not electrical engineer so all rules are with my basic understanding of electric network / power distribution. So to tackle this issue is very essential, like all GIS software, utility GIS  or AM/FM/GIS software are developed by software engineer or non domain expert. Here I have designed a configuration file that contains all the network behavior.  So by using this configuration file, I separate the domain expertise from GeometricNet library.  This  configuration file tags are self explanatory and simple.  Further to this, I am working on feature modification of  the network.

Advertisements
August 29, 2010 / Gagan

Shortest Path with Geometric Network

In my project GeometricNet (Geometric Network) I have added the functionality to find the shortest path between two nodes. This is based on A-Start Algorithm . A JavaScript  implementation of A- Star is nicely done by Brian Grinstead,  same code I have included in my project. Actually scalability of the graph and related operations like shortest path on javascript is doubtful considering amount of vector data need to be loaded ( say full network of a city roads) and operation time.  I’ll test both in coming days and post the result for same.  Here is demo of the shortest path with Geometric Network.                                                                                               

By drawing  a edge network with draw edge tool, it will create network topology itself.  The graph is implemented with modified adjacency list data structure. By drawing the flags near any two nodes initiate the process to find the shortest path between these nodes. The shortest path is shown by selecting the edges of the path.

August 16, 2010 / Gagan

Geometric Network on SourceForge

In my last blog Geometric Network creation with OpenLayers, I had shown the potential of OpenLayers that can be used to manipulate the vector data on web. Based on OpenLayers I have started a open source project GeometricNet (Geometric Network) on SourceForge. GeometricNet is JavaScript library extended from OpenLayers. GeometricNet can be used to create topological correct geometric network in Web-GIS environment created with OpenLayers.

Right now project is in alpha stage. But developers familiar with OpenLayers can use this project easily.

July 22, 2010 / Gagan

Geometric Network creation with OpenLayers

Vector feature rendering and creation with OpenLayers has opened sky to simulate desktop GIS capabilities on web GIS. One basic requirement of any GIS software is to create topologically correct data. OpenLayers Vector layer can easily create vector data with Feature.Vector class. But still advance topologies are not available like network topology.

Network topology or geometric network is a set of connected edges and junctions, along with connectivity rules that are used to represent and model the behavior of a common network infrastructure in the real world. Water distribution, road network, electrical lines, gas pipelines, telephone services, and water flow in a stream are all examples of resource flows that can be modeled and analyzed using a geometric network.(Source ESRI read more …)

My idea is to create geometric network with OpenLayers.How i have done, basicaly there are two layers Edge and Node extended from Vector Layer class of OpenLayers. Vector layer can draw the edge feature that inherits from Feature.Vector class of OpenLayers. If a edge is drawn associated nodes are created automatically and if node is added edge is splited. The association between edges and nodes are maintained any time. In a network connecting edges to a node or vice-versa can be found easily.

Here is the demo to show the network creation with OpenLayers

This demonstrats drawing of the network with correct topology. For example to draw the road network with edges and node that are associated to each other. The following abilities are shown here:
– draw edge; draw node only if it intersects with network
– draw node on edge and split the edge at that point
– draw edge intersecting the existing edge(s), create a node at intersection as well as split the edges
– maintains the edge-node network topology, while splitting the edges or adding the node.
Move mouse over the feature to see the network properties in text box.

I would  expand this work in following direction
– serializing and serializing of this data (or objects)
– how this network data can be utilized to create graph  and to find shortest path

May 25, 2010 / Gagan

Easy way to publish raster data on web

Certainly there are many wonderful Open Source tools for web GIS application. I would add one more thing that most of these applications are more robust than propriety software. The MapTiler developed by Klokan Petr Přidal also confirms my view, by showing ease for publishing raster data on web.

You have a big image of satellite data or a plan for layout and want to show with Google maps or OpenStreetMap. If you are from remote sensing background immediately Erdas IWS comes to your  mind. But is that easy and affordable for persons like architect, town planner or for html programmer. Certainly training would be required after purchasing that.  There are other open source solution to this problem MapServer, GeoServer or mapnik.  But implementation of these software also requires a good understanding of the software as well as infrastructure for installation and running.

I had  this problem to solve, publish satellite images of  more than 1GB in size. And by googling I found the solutions leading to use of GDAL library tool gdal2tiles.py. Another GUI application developed based on gdal2tiles.py  is MapTiler. MapTiler and gdal2tiles.py are having same functionality except the GUI. Persons working on Linux would love to use the gdal2tiles.py, on other hand MapTiler allows you to process the source image step by step.

This tool MapTiler or gdal2tiles.py  process the image to be published on web application, as Google overlay or as Tile Map Service by OSGeo. An image tile cache repository is created in a directory and that can be copied to web directory for easy publishing with Google maps as tile overlay(example given in MapTiler) or with OpenLayers as TMS layer. There are many options for easy processing of the raster data. Like option to select various input image spatial reference system and formats (TIFF/GeoTIFF, MrSID, ECW, JPEG2000, Erdas HFA, NOAA BSB, JPEG etc) i.e. powered by GDAL. Another feature for zoomify effect is that gdal2tiles.py creates tile images for different zoom levels. In total in less than an hour you are ready with your satellite data processed ready for web publishing.

The feature that is missing is ‘multiple source images’, right now it accepts only single image to process. In practicality many times there are many source images because of coverage or different sensors or different layout plan. Hope this would be developed in near future.

Well a very robust and easy to use tool for Web GIS.

April 24, 2010 / Gagan

A-Star Algorithm using JavaScript

Many Geo-spatial calculations are now-a-days being done on browser as many web services for vector data are available.  One of these is finding shortest path for road network. I have taken Brian Grinstead JavaScript code for A-Star algorithm.

Please check the Demo.