I have access to some open data for which I want to obtain some coordinates to put onto a map. Unfortunately, the data is in the Shapefile format which is rather difficult to work with. I am trying to convert it to something easier, preferably geoJSON or some kind of XML-based document.
A requirement is to do this within the client's application in the event that the data changes, so unfortunately I am unable to use some online tool nor can I just open the data in QGIS and export the data in another format.
I attempted to write my own Shapefile parser however I ran into difficulty with
IndexOutOfBoundsException while reading some of the records despite having shapes of type 1 (Point). Furthermore, there is a projection file that I have to deal with and I haven't been able to find much on how to map the coordinates according to a PRJ.
Is there any open-source library I can include in my application that can take a Shapefile collection (SHP, SHX, DBF, PRJ, SHP.XML) and convert it to geoJSON? I'm particularly looking into Java for Android/BlackBerry development, possibly Windows Phone in the far future.