GPS Software for PC - delphi

I will start on a private project that will require some GPS software on my computer, so far I have been contacting Garmin and Destinator to ask if they have some sort of SDK kit for theire map services. however they could not offer me this in Norway.
I am therefore asking here if anyone here know any kind of map software, capable of GPS and have some decent updates on maps every year, that also can provide me with some ActiveX component which I can embed in my application.
I really only need the most basic functions to setup a destination address and drive.. maybe turn on or off some various switches.

You should be able to get some stuff done with Google Maps.
It's slow, and you'll have to interact with a browser. I'm putting up an open source project to wrap all of it into an easy-to-use component, but until that time, using Google Maps from Delphi is just painful.
Alternatively, you could embed Google Earth into your application. Read here how to do that.
Or generate KML files in Delphi and serve it Google Earth either via a webserver via your local machine. You can have the KML refresh itself, and you can have users click links in the KML that's shown in GE. It's basically a stateless approach like normal webbrowsers. I've done that, and it works ok for simple stuff.
As Francois suggested, MapPoint is quite easy to use from Delphi, but it's not free, and it's slooooooooooow. I remember that adding pins took half a second or so. I'm talking about 5 or 6 years ago, so maybe nowadays things are better. The cool thing about MapPoint is that it renders the map for you in realtime, so it places labels intelligently so that they never clip at the borders of your map.
I've used MapWindow GIS from Delphi too. That was also slow and not very stable, but it's quite easy to use. If you don't know the application, just check it out, it's free.
For all of the tools that are mentioned here, there are ways to import GPS data, and all of them (except for Google Maps) will let you connect a GPS receiver, either directly (GE), or via a plugin (MapPoint, MapWindow).
Last but not least, you could always roll your own mapping solution, which is the route that I decided to take a long time ago.

You have the big names like MS Mappoint, ArcGIS from ESRI...
I remember using Mappoint from Delphi was very easy. Not free though!

Related

How to store openstreetmap data locally on an iphone

I'm working on a project for college and I'm having great difficulty with part of it.
Simply put, I am looking to do the following 5 things:
download the open street map data for my city
store that data locally on the phone's harddrive.
view that data in my iOS application as a map
place markers on the map.
draw paths along roads between those paths.
I have been working on this particular part of the project for a number of weeks and I'm getting nowhere with it. I haven't even been able to figure out how to store the map on the phone let alone view the map data. I've tried using the "Route-Me" library but cannot get it working (although it seems to be one of the best libraries for using openstreetmap data so I am looking to learn how to use it). I feel pretty goddamned defeated.
If anyone has accomplished any of the tasks I am trying to do could you please link me to tutorials/guides/videos that you have used.
I'm not looking for people to give me code or do the work for me, I want to learn how to do this, but if anyone can point me in the right direction of sites that I could learn off I would be very grateful.
Any advice or feedback would be much appreciated
Here's how I ended up solving the problem.
Since Tilemill doesn't natively read .osm/.o5m/.pbf files I used Osmosis to convert a .osm file into .shp files.
I then created a new project in Tilemill and added the particular .shp files I wanted as layers to the new project. It takes a little bit of tinkering to get the map to look like you want it to but it's very similar to css and pretty easy to pick up as you go.
Once I had the map looking the way I wanted it I exported it as a .mbtiles file. This takes a long time to make and the files can be very large depending on how detailed the tiles are. I did one map of Ireland with zoom levels between 7-14 inclusive and I did one map of just Dublin city with zoom levels of 11-17 inclusive. Even though the map of just the city of Dublin had much less tiles, they were both ~200MB in size.
I then found this tutorial online which explains how to store the .mbtiles file in you application and how to read it: http://martinsikora.com/creating-mbtiles-db-for-ios-mapbox-from-hi-res-map-image
Here are a few other links that I found useful:
http://www.kindle-maps.com/blog/using-tilemill-with-openstreetmap-data.html
http://mapbox.com/developers/mbtiles/
http://mapbox.com/mapbox-ios-sdk/api/
http://mapbox.com/developers/api/#static_api
http://support.mapbox.com/discussions
I hope this is useful to someone
I would suggest trying the MapBox iOS SDK. It is actually forked from the Route-Me library and will allow you to accomplish everything on your list.
A key point to remember is that you have another step in between downloading the OSM data and storing it locally on the iOS device, that is, generating the map tiles and storing them in some sort of database.
Here is an example iOS app using the MapBox SDK that has both online and offline map sources and is a good place to start.

Techniques for offline reverse geocoding on a mobile device?

I am working on a mobile mapping application (currently iOS, eventually Android) - and I am struggling with how to best support reverse geocoding from lat/long to Country/State without using an online service.
Apple's reverse geocoding API depends on Google as the backend, and works great while connected. I could achieve similar functionality using the Open Street Maps project too, or any number of other web services.
What I really want however is to create a C library that I can call even when offline from within my application, passing in the GPS coordinates, and having it return the country and/or state at those coordinates. I do not need finer granularity than state-level, so the dataset is not huge.
I've seen examples of how to do this on a server, but never anything appropriate for a mobile device.
I've heard Spatialite might be a solution, but I am not sure how to get it working on iOS, and I wonder if it may be overkill for the problem.
What are some recommended techniques to accomplish this?
Radven
You will need to get the Shapefiles (lat/lng outline) of all the administrative entities (US states, countries, etc). There are a lot of public domain sources for these. For example, the NOAA has shapefiles for US states and territories you can download:
http://www.nws.noaa.gov/geodata/catalog/national/html/us_state.htm
Once you got the shapefiles, you can use a shapefile reader to test if a lat/lng is within a shape. There are open source readers in C, just google. I seen stuff at sourceforge for shapefiles, but have not used these myself.
The Team at OpenGeoCode.Org
If you're looking for an approach based on a quadtree, try Yggdrasil. It generates a quadtree based on country polygon data. A Ruby example script can be found here.
I can suggest good written offline geocoding 3rd party library.
https://github.com/Alterplay/APOfflineReverseGeocoding

delphi+openstreetmap

is there a vcl or a project (in delphi) that would allow me to download OSM tiles and display them on an app?
I have tried embedding an browser and it worked great but i need a way to display the maps offline.
As I see it, there is 3 ways to do this :
Save all displayed tiles as a single image (could be done easily with a TWebBrowser, or TEmbeddedBrowser component) : you would navigate to the map address (OSM Mapping Server) based on given coordinates (top left corner), and then take a snapshot. You need to recalculate the base coordinates (top left corner) after each snapshot.
You need to understand how tiles are generated, wich is not quite difficult :
basically, the scheme of osm tiles generation is as follow http://osmserver.org/tiles/tile/x/y/z.png
Once you understand how it works, you could calculate tiles url by code and download'em one by one.
For more info on the tiles generation scheme look here :
good thread on manifold forum : http://forum.manifold.net/forum/t71011.13#75206
http://wiki.openstreetmap.org/wiki/Slippy_Map
http://wiki.openstreetmap.org/wiki/Tiles%40home
or if you need to go further : http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.5
download the entire OSM maps (available on the web) and use a VCL component to display them (Tatukgis DK...)
Best Regards,
Mo3ez
I don't know the OpenStreetMap project very well, but there's a chance that the project itself has the software to "view" the maps inside a page.
You can accomplish your goal: show the maps off-line using the same basic construct you have now for the user interface: a embedded browser.
What you change is the url the browser will connect to to something like (http://localhost:3458), making your application her own web-server, for example, with Indy TIdHTTPServer binded to port 3458 (just an example port).
That way, you can serve the content for the embedded browser from inside your application, in the same way Delphi IDE (>= 2005) itself provides content for the main page you see when you start it (in fact, a embedded web browser).
To that browser, you serve the viewer page, all it's dependencies and the OSM file. The only restriction to this idea is the viewer MUST do all the things on the client side (for example, it could be javascript, flash, etc.). No server side scripts, unless you are willing to "mimic" the server side behavior or to integrate your application with the script engine (not too easy).
Other chance is to use THBImage, who offers OpenStreetMap integration with Delphi and a (not working) site demo.
Oops! I tried to provide a few hyperlinks in my message but as a new StackOverflow user I'm limited to just one. You might checkout the "Need solution to display map" message thread (25-Jan-2010) on: embarcadero.public.delphi.thirdpartytools.general
I'm trying to solve a similar problem. I need to display a county-wide or city-wide map using Delphi and then put custom icons on the map. I do not need routing or a very detailed map. In the past I've used a TMS "hotspot" component for the custom icons on top of a TImage. Now I need a way for the client to select their own map for the static background image.
A freeware MFC GUI control class (with source) which implements display of OpenStreeMap tiles:
www.naughter.com/osmctrl.html
The zip there has an executable that shows how it works.
This unit is to calculate URLs for the OpenStreetMap Project's TileServer, and other useful utilities as may be needed. If you want to use OpenStreetMap in your pascal programs, then this is for you.
http://code.google.com/p/openstreetmap-fpk/
I'm also considering using the free Tiger/Line maps. Those look pretty good in a free Linux program (xastir).
TatukGIS looks very good (and expensive). I certainly don't need a full GIS solution so this seems to be way overkill just to display a map. But if I don't find a simpler solution this still might be better than integrating MS MapPoint.
TGlobe seems like what I need but sadly it is no longer available.
look in StelMAP for Delphi with OSM
Component to view a map of the project OpenStreetMap for Delphi 2010 without using browser or scripts.
You can view maps offline. Support for proxy servers for work online. Multi-threaded loading tile map speeds up the process to download and view maps.
The set of procedures and property allows you to add a component to map an unlimited number of layers, shapes and images.
Don't know about OSM files, but if you can open them in a browser, you can always embed a TWebBrowser in your Delphi application and load the files within it.
Not the most elegant, but should work...(requires IE)

Emulate GPS or a serial device

Is it possible to get location data out of Google Gears, Google Gelocation API or any other web location API (such as Fire Eagle) in such a format that it appears to other software as a GPS device?
It occured to me reading these answers to my question regarding WiFi location finding, on Super User, that if I could emulate a GPS unit, many of these web services could act as a 'poor-mans' GPS to otherwise less useful software that requires it.
Is GPSD an option?
Preferably OSX & Python, but I would be interested in any implementation.
There is a very similar thread on a Python mailinglist that mentions Windows virtual COM ports and discusses Unix's pseudo-tty capabilities. If the app(s) you want to use let you type in a specific tty device file, this may be the easiest route. (Short of asking the authors to provide a plugin API for what you're trying to do, or buying yourself a $20 bluetooth GPS mouse.)
Are you using OS X?
There is a project macosxvirtualserialport on Google code that provides a graphical wrapper around some of the features of a utility called socat. I'd recommend taking a look at socat if you see potential in the pseudo-tty route. I believe you could use socat to link a pipe from a Python program to a pseudo-tty.
Most native Mac apps will be querying IOServiceMatching for a device with kIOSerialBSDRS232Type, and I doubt that a pseudo-tty will show up as an IOKit service.
In this case, unless you can find a project that has already implemented such a thing, you will need to implement a driver as described in this How to create virtual COM port thread. If you're going to the trouble of create a device driver, you would want to base it on IOKit because of that likely IOServiceMatching query. You can find the Apple16X50Serial project mentioned in that post at the top of Apple's open source code list (go to the main page and pick an older OS release if you want to target something pre-10.6).
If your app is most useful with realtime data (e.g. the RouteBuddy app mentioned in the Python mailinglist thread can log current positions) then you will want to fetch updates from your web sources (hopefully they support long-polling) and convert them to basic NMEA RMC sentences. You do not want to do this from inside your driver code. Instead, divide your work up into kernel-land and user-land pieces that can communicate, and put as little of the code as possible into the kernel part.
If you want to let apps both read and write to these web services, your best bet would probably be to simulate a Garmin device. Garmin has more-or-less documented their protocol in the IntfSpec.pdf file included with their Device Interface SDK. Again, you'd want to split as much as you could into user-space code.
I was unable to find a project or utility that implements the kernel side of an IOKit-based virtual serial interface, but I'd be surprised if there wasn't one hiding somewhere out there. Unfortunately, most of the answers I found to that question were like this, with the developer being told to get busy writing a kext.
I'm not exactly sure how to accomplish what you're asking, but I may be able to lend some insight as to how you might begin to get it done. So here goes:
A GPS device shows up to most systems as nothing more than a serial device -- a.k.a. a COM port if you're dealing with Windows, /dev/ttySx if you're in *nix. By definition, a serial port's specific duty is to stream data across a bus, one block at a time. So, it would then follow logically that if you want to emulate the presence of a GPS device, you should gather the data you're consuming and put it into a stream that somehow acts like an active serial port.
There are, however, some complications you might want to consider:
Most GPS devices don't just send out location data; there's also information on satellite locations, fix quality, bearing, and so on. Then again, nobody's made any rules saying you have to make all that data available. There's probably more to this, but I'll admit that I need to do more research in this area myself.
I'm not sure how fast you can receive data when dealing with Google Latitude, etc., but any delays in receiving would definitely result in visible pauses in your "serial port"'s data stream. Again, this may not be as big a complication as it seems, because GPS devices are known to "burst" data across the bus anyway, but I'd definitely keep an eye on that. You want to make sure there's always a surplus of data coming across, not a shortage.
Along the way you'll also have to transform the coordinates you receive into valid GPS sentences, as well. You can find specifications for those, but I would definitely make friends with the NMEA standard -- even though it is a flawed standard, it's the one everyone seems to agree on anyway.
Hope this helped you, at least a little bit. Are there anymore details specific to your problem that you think could be useful in answering this question?
Take a look to Franson GPS Gate which allows you to connect to Google Earth among other things (like simulating GPS and so on). Is windows only though but I think you could get some useful ideas from it.
I haven't looked into it very much, but have you considered using Skyhook's SDK? It might provide you with some of what you are looking for. It's available for every major desktop and mobile OS.

Is the Map Rails Kit worth the money?

http://railskits.com/map/
Would you like to launch your own
google map mashup? Need a way to
easily get data onto a map, but don’t
want to have to dig through piles of
poorly documented Google Maps
javascript code?
The Map Rails Kit allows you to deploy
a map mashup instantly. It extracts
all the Google Maps implementation
details, organizes all the
customizations into an easy to use
config file, and reimplements the map
controls, bubbles, and markers so your
app looks unique.
Populating your map with markers
consists of working with a few simple
ActiveRecord models so it’s amazingly
easy to get started. Create marker
records with titles, bubble content,
and location. If you specify just an
address to your markers, your markers
will be automatically geocoded for
you. You can even add tens of
thousands of markers to your maps
easily, and they’ll dynamically load
onto the map only when they are
currently in view as your users
navigate the map.
The Kit includes all the usability
polish that your users would expect in
a commercial map mashup. Their current
map settings are always saved via
session so when they come back to the
page later on, they’re right where
they left off before. For new
visitors, we support hooking into an
ip2location service in order to
initialize their current position. So
they immediately see their current
spot on the map, and can begin
interacting with it.
This Kit was authored by Jacques
Crocker.
This is kind of subjective, but I don't find the Google Maps API nearly as daunting as the blurb makes it out to be. I don't think I'd pay half a grand for an API to the Maps API — especially since you can buy a whole book on the topic for like $15 even if you find Google's docs lacking.
This guy doesn't even make it clear what it is he's selling. He makes the features of using the google maps API with Rails sound more difficult than entire feature set of Google maps itself.
There are plenty of other plugins and/or gems available that do more or less the same thing with slightly more effort involved and the book of course (possibly more than one at this point).
If you want a turnkey solution for stacks of money, .NET or some more commercial platform will have more options. I would avoid using this guys solutions out of selfishness, if he does well they'll be others with more colorful marketing making such grand solutions. After which Google will be clogged with them and we'll have to wade through dozens of such spectacular offerings to find the better, albeit less polished (less advertised) open source versions.
Are there any good googlemaps plugins for rails?

Resources