Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
As a part of my 4th year software engineering degree I'm doing a project in which I'm giving visualization to several path finding algorithms (for multiple agents).
The first part of my project was building a re-sizable grid environment and implementing 2-3 different path finding algorithms.
The second part involves Geographical maps. I want to able to show the user a real geographical map, for example a road map, and give the algorithm the roads data as input so that the algorithms will work on this data (i believe its called a layer in a vector map) and produce a path as an input.
So eventually i will be able to show the movements of the agents on the map according to the calculated path.
The algorithms we implemented are pretty generics in the states and data they can use, so my biggest issue is figuring out how to display the map file as part of the application and where to get the input data for my algorithm.
At the beginning i thought of something like the GoogleMaps API but I'm not sure its what I'm looking for as Google maps is for web and I'm not sure that they give access to the roads layer.
So i think that what i need is some sort of an open source GIS that i can easily integrate into a java application and i will also need sample data, which is the background image ( raster map i think) and the road layer which will be used as an input for my algorithms (A* for example).
I've never worked with such systems before so it would really help me if someone could give me some directions and recommend me a good GIS library that i can use in my project (it has to be open source)
Check out NASA Worldwind, its similar to Google Earth in a lot of ways, with a Java API
http://worldwind.arc.nasa.gov/java/
To get hands on this you may visit OpenStreetMap and you can download some "raw" data as XML.
You can use the Google Static Maps API to display your map as images. It requires you to do an HTTP request (With additional parameters) and it returns you an image, that you can display.
Alternatively, you can use OpenJUMP (which is completely written in Java).
OpenMap is an open source mapping project that supports a variety of mapping formats written in Java.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed yesterday.
Improve this question
I'm trying to figure out how to: read xbrl files, analyze the files and make use of the data e.g. for calculating key figures, in Java.
I know how to read xbrl files as xml and structuring them with json nodes, but I have concluded that it's much more complicated to actually analyze them and use the data. I figured out that tags and attributes like "context id", "period" and "dimenson" etc determines how data is wired together.
Now, I'm not going to implement my own xbrl processor from scratch, because I simply don't have the time and knowledge to do that.
I'm looking for a Java library, including documentation and/or guides on how to use it, that processes xbrl files and that can be used to analyze and extract data.
I searched the web and read a few articles about how to get started, but I didn't quite find something that seemed very useful.
Any suggestions? I would really appreciate if someone could point me in the right direction.
Using an existing XBRL processor is a good idea as it saves you the (considerable) efforts of interpreting the XBRL semantics at a raw syntactic level.
From the top of my mind, I know of at least the following products that offer a Java API, in a random order. I have no affiliation with either and abstain from commenting further to not land into a taste/preference discussion.
Reporting Standard: http://www.reportingstandard.com/index.php/en/
CoreFiling: https://www.corefiling.com/
There are probably many more, possibly also open source. XBRL.org has a much more comprehensive list of vendors here as well as a getting started guide for developers.
I was able to parse Xbrl files from XbrlParser project here.
Credits: https://github.com/marcioalexandre
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am creating a Spring application and I have the need to integrate with Wikipedia. In particular, I would like to extract data on a given (large) set of Cities, e.g. country, website and coordinates.
I am trying to understand which libraries or frameworks can be useful, but the big issue I am dealing with is that there is no reference structure for the pages I would like to extract information from. The main problem is not that some information is missing, which would be totally acceptable, but rather the city representation changes from city to city. E.g. the DBPedia ontology (e.g. http://dbpedia.org/ontology/City) does not reflect what I can extract via SPARQL query from dbpedia.org/sparql. This way, I don't know how to extract the data I need systematically (i.e. for my entire set).
Is there any technology that can support my task of extracting data on a predefined set of cities?
One solution could be to put in place some Natural Language Processing in order to seek for the required info in the entire Wikipedia page, but that requires a lot of effort, if I have to write it on my own.
Another solution could be leveraging a source of structured data that pre-processed Wikipedia for me and gave some structure to the contained information, but I could not find one.
On third solution could be trying to make different queries to Wikipedia, but I cannot figure out a way to extract the information I need via those Wikipedia APIs.
Data from Wikipedia is being transfered to Wikidata. Using their API you could get what you want. If you want a shortcut you could use the Wikidata query tool: http://wdq.wmflabs.org/api_documentation.html
Im not a java guy, but I did something like this in .Net.
You need some kind of web scraping framework.
In .Net there is HtmlAgilityPack. Where you get the site and then with fx XPATH go through elements of the sites. Offcourse you need to know where on the site the informations is. That could be the tags around the heading, text and so on.
For java, the framework I just found was
Tag Soup
HtmlUnit
Web-Harvest
jARVEST
jsoup
Jericho HTML Parser
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I need a commercial-friendly (Apache Licence, LGPL, Mozilla Public License etc) R-tree implementation in Java, in order to substitute the geonames Web Service for timezones, as suggested in the question "Determine timezone from latitude/longitude without using web services like Geonames.org". I have found some around, but I was wondering if someone has evaluated or used them in practice.
https://github.com/rweeks/util/blob/master/src/com/newbrightidea/util/RTree.java -
LGPL implementation of R-Tree by Russ Weeks. It looks very simple and clear and not dependent on external libraries.
http://www.mischiefblog.com/?p=171
http://www.mischiefbox.com/blog/uploads/rtree.jar
LGPL implementation of R-Tree by Chris Jones. Another simple and clear solution.
http://www.khelekore.org/prtree/
CPL 1.0 implementation of Priority R-Tree by Robert Olofsson
http://jsi.sourceforge.net/
LGPL - project aims to maintain a high performance Java version of the RTree spatial indexing algorithm.
First of all let me point out that if You'll look up the nearest city from the given coordinates, it might not be in the same time zone! What you really need, in my opinion, is an information about it administrative affiliation - minimum would be a country, but in some cases it should be even more than that, i.e. state. That information can be retrieved with Google Maps API and then correlated to some more detailed TZ information.
there is a free alternative to GeoNames - EarthTools. There are some limitations to the service itself (number of requests, etc.), but still it's good, tested and working just fine for me.
Second of all - there is a free alternative to GeoNames - EarthTools. There are some limitations to the service itself (number of requests, etc.), but still it's good, tested and working just fine for me.
Third of all - if You would care about importing the data into DB, most of the current DB implementations provide geo spatial indexes that you can use. If You need that information embedded in Your application, you can use H2Database (embeded Java DB) with H2Spatial addition - although I've tried it and I can not recommend it fully. Neo4j have a great spatial index implementation
Additionally You can use Solr for GeoSpatial searches. It's nice, it's quick and it's easy to implement. I'm actually in the middle of the process of migrating my DB searches to Solr...
Last, but not least, below you'll find some of the ones I've tested a while back:
JSI - LGPL
GeoTools - LGPL, an overkill, will give You far more than what you need... but it's great!
Possibly few more there, but the ones I've tested so far...
RTree simple Java class created by me:
https://github.com/hadmir/rtree/blob/master/RTree.java
All objects are stored inside two int[] arrays, so it is really easy to persist (to file). Also, fact that adding new rects doesn't create any objects means that you can insert millions of rectangles into RTree and JVM will not burn in flames. This is useful for geo projects, where object counts are usually enormous.
Only 2D rectangles are stored (so, for complex object you need to find bounding rectangle). Query returns all rects (IDs of rects) intersecting or overlapping with "query rectangle".
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am looking for a library that can run on Java ME (Foundation Profile 1.1, CDC) and allows me to basically do something along the lines of
FILE OF type;
in Pascal.
Background: I need to have a largish (approx. 100MB) set of around 500.000 records for lookups by a known index value quickly. Do I really have to write this myself? Databases like Derby are way too big and bring lots of features (stored procedures, anyone?) I do not need.
Ideally I would just like to define a class with a few fields based on primitive types and Strings as a value holder object and persist these in a file I could - should the need arise - manually recover. That's why I am not too much into serialization. From the past I have fought several occasions of corrupted binary data files which could not be recovered at all.
Your biggest problem here is establishing a correspondence between field names and columns in the file, as you really shouldn't assume that the class layout matches the field ordering in the source file.
If the file were to contain a header row then it's a simple matter of using reflection/introspection and shouldn't take more than a day to implement yourself.
Alternatively, you'll have to use an annotation of some sort to specify, for each field, where it appears in the file.
Have you instead considered alternative text serialization methods, such as CSV, JSON or XML using XStream? These avoid the risks of binary corruption and would get you up and running faster, but might also impose a higher memory footprint which could be an issue as you're targeting a mobile device.
After looking around for quite some time, I have finally come to xBaseJ from SourceForge. It relies on java.nio, which is normally not included in the JavaME CDC profile, but we had a contractor port the relevant parts to the mobile J9 VM. Armed with this, we are now building our application on top of DBase III compatible files. Apart from being pretty reasonably fast, even on the mobile platform, this gives us access to a plethora of tools that can handle this format, without having to teach non-tech folks about a JDBC based DB admin tool they do not feel comfortable with.
There has just been a recent release of a whole eBook, called "The Minimum You Need To Know About xBaseJ", which is available for free from the project's website, too.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm trying to find a simple Java API for creating graph relationships. It should have some functionality like addEdge(), addNode(), isConnected(node1, node2), findPaths(node1, node2), etc. I need no UI, just logic.
I found a bunch of academic projects, but none seems to be "The Definitive Graph API".
Does anyone know about such an API?
JGraphT sounds like what you're after.
JGraphT is a free Java graph library that provides mathematical graph-theory objects and algorithms. JGraphT supports various types of graphs.
Their API can create graphs from various input and also supports creating graphs using addVertex, addEdge. They support finding shortest paths using various well know algorithms such as Bellman-Ford and Dijkstra They also have a complete javadoc available online.
JDLS is a great library for Graphs and Datastructures in general. You could also use the Grappa library. Its advantage is that it can use the graphViz libraries for graph layouting.
Definitly You should try the http://neo4j.org/
This is great Graph database written in Java but It can work as a embedded database to very small application too.
This database have everything You need even if you plan to store billions of nodes. Good luck.
a really decent one can be found here: http://javaddlib.sourceforge.net/jdd/
JUNG — the Java Universal Network/Graph Framework - is one of the fastest available (implementing the CERN math library COLT), especially if you want to do graph analysis, centrality measurements (betweennes, pagerank, etc.). Furthermore it allows for network visualization.
Jdigraph is yet another graph library.