Angular: Using BehaviorSubject to react to a user action

Recently I had a case where I needed some Angular components to listen to a user action and update their model based on that action.

That action was switching languages for specific components. There are many ways to actually achieve such a behavior, but I decided that the most elegant way was to use BehaviorSubject.


Generic Clients for GeoServer

Third post this year. Charming :-)

I’ll start with a little gossip.

One member of our team (and probably the most important) left the current company that we were collaborating with and the rest of us are more or less still debating whether we should follow his lead or not. Time will sort things out I guess.

In the mean time, I decided to write a small gis app, that functions as a generic interface for Published Geoserver Layers (or any other ogc compatible GIS server).

The need arose after writing several demo apps for various projects…and since as they say “a good programmer is a lazy programmer”. Which in my case translates to

“I hate to repeat, over and over and over my work with minor configuration changes”.

I decided to write something like this and share it with the world.


Custom OpenLayer Control

Today I decided to write a small tutorial on how to write a custom control in Openlayers (2.x) that can identify a wfs feature without the wfs being displayed in the map.
The data I am working are mainly polygons, they cover the whole area that the project focuses because they obey a basic topology (no overlapping and no gaps).

  • Step: One
  • we have to name our control, so I choose the obvious name Identify

  • Step: Two
  • what is important is to write the initialize function and decide what handler our control will use, OpenLayers has several handlers that one can use. In this Controls we will use the Click Handler because we need the user to click and map also we need to define some default options for it


ArcMap Custom Tools

Posts in this blog are a rare thing. The main problem is that we don’t really have a lot of time, plus we can’t share most things that are being developed in the company that we are currently collaborating with. (not to mention that I am soon to become a dad and thus time will be even more limited)

Nevertheless lately we had among other things to develop some custom tools and add-ins for esri’s ArcMap platform. Although we are usually against developing plugins for non expert users on such complex platforms (we prefer developing a standalone engine based application) due to a lot of restrictions and security mechanisms we were in a sense forced to accept such solution.

Among this solution we developed some simplified editing tools for less expert users. A generalized version of those tools are now available at git-hub.


geonetwork queries

Recently we had a project that a part of it was about querying a local Geonetwork server from a custom interface and being able to project both the returned XML schema as well as the results’ bounding box into a OpenLayers map.

For several reasons, I didn’t want to use a server side language so I just went ahead and did everything in Javascript.

I know that such thing is nothing special. It’s just figuring out how to form the XML request the way Geonetwork requires it.

So after writing the whole thing up. I thought, why not publishing the JavaScript code at a  github project. You never know someone might need such solution in the future.

It obviously doesn’t work out of the box, since it was written in a hurry and based on a particular interface, but its pretty obvious how it works, to anyone who writes JavaScript.

I intend to write detailed comments as to what does what and whats the purpose of all those variables, as well as to make it a bit more generic.



ICIS 2013

This week, I attended ICIS 2013 as a guest. Obviously, the conference topic may be way of my interests, but I did get to enjoy quite a few presentations and had a few interesting interactions.

One Phd student, in particular, that approached us, and after me explaining him that my background is not of an academic nature and the only relation I had with IS is from the industry’s point of view. He made a remark about not being easy to pick up ideas at such a conference and couldn’t understand my presence. And from his point of view, that was true. From my point on the other hand was quite easy to spot that some underlying ideas behind a some papers were already applied at an industry level. Which actually says a few things about how students think. Like …they seriously need to speed up some processes, realizing that creating a bridge between theoretical and practical applications, is at some cases applicable.


Esri Dev Summit Europe 2013

This year we attended for yet another time the Esri Dev Summit in London.

This year was way better than last year, from every aspect. ESRI was way more organised, had better quality in presentations (though there were a few exceptions) plus a lot of amazing innovations. Also the food was more “interesting”.

They claim that they improved the whole conference based on last year’s feedback, and I definitely believe them. So thumbs up on that, even if the conference began with a fire drill, driving everyone outside in the cold (same thing happened last year…in a couple of years it might end up as a conference ritual).

increase vdi space and Linux partition using terminal

Last night as I was setting up a Oracle Linux test server I accidentally allocated the default virtual box value in GB. That was roughly 12GB. Enough space for a test installation if you consider that Oracle Linux 6 takes up around 7GB. But I wanted to install ArcGIS server and for that I needed more than 6GB of space, which apparently the current configuration was not adequate. Till I realised that, I had already spend quite some time configuring the system, so there was no chance to go back and start the process all over again.

On the other hand the easy solution to extend the Disk was through Gparted which again was not an option cause there was no point in spending time installing a Desktop environment and looking around yum for all Gparted dependencies, since Gparted is not part of the default yum repository.

So I had to do the whole process through command line.

Luckily It can be done.


Tiraggo.ef New Query API for the Entity Framework

Who said that Christmas comes but once a year? Mike Griffin tweeted a few days ago that a new query engine have been developed for the Entity Framework, leaving aside painful linq queries. The new query engine named Tirago.ef uses the same syntax as Entityspaces did, which is more sql-like in syntax and at the same time simpler and faster.

Tired of LINQ and Lamba?

Have you ever stumbled upon LINQ queries that are so unintelligible and complex you needed to crawl under your desk and have a good cry? Have you ever taken a good look at the over-complicated SQL generated by LINQ? And what’s the whole story about not being able to select certain columns?

This is 2013 folks.Tap into your T-SQL knowledge and write queries that actually make sense.


Pattern Based Sudoku Solving Algorithms (part Β)

I wonder if I ever get serious and finish my projects or any for that matter. Last time I presented a fairly complicated algorithm idea about a more humanized based Sudoku solver instead of the brute force ones that applications usually utilize.

Someone can argue, what’s the point of creating a fairly complicated solution to a simple problem that can be solved in just a few seconds using brute force.

Well Because its fun. So, here you go, another made up Sudoku solving algorithm

This time, I though, that it would be interesting to combine my geometrical and topological background, as well as some GIS based algorithms that we have developed over time.

The first implementation cannot solve all Sudoku puzzles but it can do fairly well in medium strength ones like this one