I would like to implement a sort of plot builder (x-y plot, x-time plot, bar not complex plots), where the user defines the generic properties. The results should be some templates that can be used at run time (drag/drop) in another application in which it is decided the data to be plotted. Do you know some tools to be integrated in java or some articles from where to start. I tried to guess if JFreeChart or Gral are able to be used for such things or to pass directly to purchase some product.
Thanks
Marco
You can certainly use JFreeChart for this - it's a good library, the charts are pretty flexible and can do all the things you are likely to need from regular plots.
Though you would need to do some extra work to implement "drag/drop" and and special data linking capabilities. I expect this will be the hard part, whatever charting tool you use.
Related
I don't know what is the name of this visualization type, but I want to learn how to draw trees like the ones in this image:
I've seen this kind of visualization in many sites but I'm unable to know the technical term behind it.
That graph seems a lot like a force-directed layout. Painting those kind of images is not an easy task, depending on what are you trying to accomplish, you might want to use an existing framwork. If you want to use java you should see at gephi, if you can use an html approach you should definitely take a look at d3.js which is a javascript library for data visualization. They have neat examples: directed-force layout, and collapsible-force layout.
This particular image is done by Stephanie Posavec. You can learn about her design process from an interview she gave the folks at the Data Stories podcast. As far as I remember it, she partially crafts her visualizations by hand, so I'm not sure if you'll ever find an algorithm that does exactly this for you. For different tree layout algorithms, you can refer to treevis.net.
I've been tasked with a thesis project where i have to extend the features of ArcGis. I've been asked to create a model written in Python that can run out of ArcGIS 10. This model will have a simple user interface where the user can drag/drop a variety of shapefiles and enter the values for particular variables in order for the model to run effectively. Once the model has finished running, a new shapefile is created that lays out the most cost effective Collector Cable route for a wind turbine from point A to point B.
I'd like to know if such a functionality/ extension already exists in ArcGIS so i don't have to re-invent the wheel. If not then what is the best programming language to learn to extend ArcGIS for this (Python vs Visual basic vs Java). My background is Java, PHP, Jquery and Javascript. Also any pointers in the right direction i.e documentation, resources etc would be hugely appreciated
You must understand EXACTLY how it should work and where the tool should place all input and output datasets, their structures, attribute table fields and so on.
There is only one person who knows all these stuff - and it is You.
And it is not "the wheel", but it is a custom tool. You can build a model in built-in model builder (the great thing) and then export the model into a Python script.
Check this video http://www.youtube.com/watch?v=mBSXBqEP-7Y
And again. You have to know: 1) Input datasets and parameters 2) What do you want to get as the output 3) How it should work
I do stuff like this every day for my day job in customizing ArcGIS for utility companies like gas, water, and electric. We create buttons for them that does similar things like - draw a service gas line from the gas meter point on the side of the house to the nearest point on the nearest gas main line, split the main at that point, insert a "T" point feature, and connect the service line from the "T" to the meter.
We mostly use C# and a bit of VB.net. You may want to look into creating a Python Add-in for something like ArcGIS Explorer. Or an Add-in for ArcMap.
Explorer and ArcMap let you add shapefiles as layers in the map. Add-ins let you easily add a button to the toolbar that can do things to the features on the map like query their attributes and modify their attributes and geometry to move them around on the map, as well as create new features and fill out attributes and place them on the map with X,Y or Lat/Long.
So your "Calculate Best Cable Route" tool could be a button your create on the toolbar (ICommand) that would first:
1. let the users select point A and point B on the map using the built in selection tools in Explorer/ArcMap.
2. let the users click your custom ICommand button.
3. your ICommand.OnClick() method would then execute all the code to try different routes based on geometry of other features on the map like street edges, building outlines, property lines, etc. then calculate the total cost like digging in dirt, asphalt, and getting permission/Right of way for cases where it goes over property lines.
See the ArcGIS ArcObjects API here to get started:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/ICommand_Interface/00430000001s000000/
Creating a Python AddIn is probably the quickest and easiest approach if you just want to do some geoprocessing and deploy the tool to lots of users.
But as soon as you need a user interface (that does more than simply select GIS data sources) you should create a .Net AddIn (using either C# or VB.net).
I've created many AddIns over the years and they are a dramatic improvement to the old ArcGIS "plugins" that involved lots of complicated COM registration. AddIns are easy to build and deploy. Easy for users to install and uninstall.
.Net has excellent, powerful features for creating rich user interfaces with the kind of drag and drop that you require. And there are great books, forums, samples to leverage.
I have written an application which outputs data as XML. However, it would be nice to allow the user to completely customize the output format so they can more easily integrate it into their applications.
What would be the best way to approach this problem? My initial thoughts are to define a grammar and write a parser from the ground up.
Are there any free Java libraries that can assist in parsing custom scripting(formatting?) languages?
Since I already have the XML, would it be a better approach to just 'convert' this with a search & replace algorithm?
I should specify here that 'users' are other programmers so defining a simple language would be fine, and that the output is potentially recursive (imagine outputting the contents of a directory to XML).
Just looking for general advice in this area before I set off down the wrong track.
EDIT: To clarify... My situation is a bit unique. The application outputs coordinates and other data to be loaded into a game engine. Everybody seems to use a different, completely custom format in their own engine. Most people do not want to implement a JSON parser and would rather use what they already have working. In other words, it is in the interests of my users to have full control over the output, asking them to implement a different parser is not an option.
Have you considered just using a templating engine like Velocity or FreeMarker.
I would have created a result bean as a POJO.
Then I would have different classes working on the result bean. That way you can easily extend with new formats if needed.
E.g
Result result = logic.getResult();
XMLOutputter.output(result, "myXMLFile.xml");
Format1Outputter.output(result, "myFormat1File.fo1");
Format2Outputter.output(result, "myFormat2File.fo2");
If you are planning to provide this as an API to multiple parties, I would advise against allowing over-customization, it will add unnecessary complexity to your product and provide just one more place for bugs to be introduced.
Second, it will increase the complexity of your documentation and as a side affect likely cause your documentation to fall out of sync with the api in general.
The biggest thing I would suggest considering, in terms of making your stream easier to digest, is making the output available in JSON format, which just about every modern language has good support for (I use Gson for Java, myself).
I would like to use the concept of MindMap
http://en.wikipedia.org/wiki/Mind_map
in a AI program. Is there any API for java? A good api for drawing and manipulating graphs with enough documentation and examples will also do the job.
I dont actually need to represent it graphically , i just need to build the map in any method(used for representing graphs, ) and search in it.
The program shall take a word as input
Search the mindmap for it and display the relevant words.
JGraphT was possible solution for me. I am working on it
Have you tried FreeMind? It's an open-source Java MindMap framework.
I have to draw a graph with many nodes, and I thought that an user interface like what Google maps offers could be nice to navigate the graph. I'm currently using Java for my application (a web application): what technologies/libraries should I use to build an interface like google maps? What approach?
edit: I'm interested mainly in creating a draggable map with zooming capabilities
edit2: I'm not looking for the exact solution of the problem, but for some starting point
If you have a massive data to display, one approach is to create an interactive interface that let the user to navigate in your data. Higher the zoom, greater the details.
An example of google maps like interface for other purpose is zoompy
Are you familiar with OpenLayers? It is JavaScript map visualization library. Combined with something like OpenStreetMap, you can get some very powerful visualization with data for free.
Take a look at the tools in Eclipse's Graphical Modeling Project.
Take a look at Polymaps, specifically the support for vector data via geoJSON. It's a Javascript library that handles doing all the slippy-map interface: zooming, scrolling, and loading new sections of the map via HTTP. It renders to SVG, so it looks great and works in every browser except pre-9.0 MSIE.
It's a bit odd to use a geographic tool to draw arbitrary graphs, but it's totally doable. The Mandlebrot example is a proof of concept.
I was successful using modestmaps for Processing (find it here). A processing PApplet can be embedded in a swing GUI as explained here. I guess you could use the source to draw your graph in processing and then use the already implemented 'slippy map' features.