I'm serving GeoTIFF raster images (epsg:4326) via mapserver that wrap across the international date line. Since they span beyond the usual -180 - 180 bounds, I would like the images to be served regardless of which "side" of the coordinate space the query comes from. ie:
[...]bbox=150,0,250,90[...]
should serve the same image as
[...]bbox=-210,0,-110,90[...]
is there any way I can communicate to mapserver that it should search current space +/- 360 (and maybe even beyond?) when looking for valid data to fill an image with?
Related
I want to use a czml to draw some spheres floating around an area of the globe, and I want them to keep the same size regarless of zoom (within limits). This is trivial with a gltf model, but I cannot find a way to do it with an ellipsoid.
I wanted to display a map in HTML5 notification. Since notifications do not allow a full fledged HTML+JS app to run inside them, I wanted to show just an image.
The question is how do I get the link to the appropriate map tile image if I know the lat/lon co-coordinates. I can set some fixed values for zoom level etc. I don't wan't to run my own tile server or depend on third party servers (other than openstreetmaps.org) that may go down any time. I am okay with the lack of ability to customize image size, or centering image around the co-ordinate etc.
There are a bunch of example conversions from lat/long to tile number in various langauges on this OSM wiki page - hopefully you'll find something there that you can use.
My first KML project was an animated map of the Washington DC Metro system (see Animating Metro with KML and Google Earth). Unfortunately, where Metro lines share the same track, only one color prevails. The real map shows a wider line with both colors side by side.
Is there a way to draw a line in KML (Google Earth) with two side-by-side colors? I've seen a way to have a different color on the edges of the line, but that's different.
I could cheat by changing the coordinates of each station, but aside from computational difficulties, I'd have to continuously changes to positions every time the user zooms, to prevent a gap between colors (or an overlap).
Other subway systems show more than two colors running alongside each other, so an option to show multiple colors would be nice. And this is not really a gradient, as the colors don't fade together; they should be distinct, assuming the pixel width is wide enough.
This is probably a feature request, though surely someone else has run across this problem before Google Earth v6? Would love to be able to do this, or find a good workaround in the interim.
Michael
http://www.mvjantzen.com/blog/
The short answer is no, although you could probably create a custom MVC object that renders the line for you as desired (i.e. you would not need to alter the Kml)
http://code.google.com/apis/maps/articles/mvcfun.html
That said, your cheat method could work too - and I would disagree that
"...I'd have to continuously changes to positions every time the user
zooms, to prevent a gap between colors"
You can set the <gx:physicalWidth> property which allows you to set the width of a LineString to be in meters, rather than pixels.
https://developers.google.com/kml/documentation/kmlreference#gxphysicalwidth
In the case of your track example, this means you can set the width of the track to match the underlying imagery no matter what altitude the end user views it from.
I want to make an html5 app for mobile devices, where one of the features is a Google Map. I am able to do this using the regular apis embedded in html5 in the normal way.
However, for the next version I want something more particular. Instead of the user being able to view anywhere in the world at any zoom, I want to restrict it to view only inside, say, a 20 km rectangle around a particular location, for, say, only 4 levels of zoom. i.e. there is only a small finite number of tiles that ever need to be used. Also since there is a limited area and a small finite number of tiles, I want to download absolutely all the tiles for every zoom level when the html5 app first opens, and store them locally. This would allow a user to look around inside this 20 km rectangle, and zoom, pan, etc, and the loading would be lightning-fast. (i.e. it would not be fetching new data from GMaps' servers each time you change zoom or pan--instead all of that data would be stored locally (downloaded when the app is run for the first time) and simply displayed as the user navigates around. How do I do this?
Also if there is a non-Google-Maps solution I am interested in that too.
Thanks
Would this article by Drew McLellan on 24ways help you out in any way?
http://24ways.org/2010/finding-your-way-with-static-maps
That would be breaking the Terms of Service. You are not allowed to download/cache tiles.
This may not be a programming related but possibly programmers would be in the best position to answer it.
For camera calibration I have a 8 x 8 square pattern printed on sheet of paper. I have to manually enter these co-ordinates into a text file. The software would then pick it up from there and compute the calibration parameters.
Is there a script or some software that I can run on these images and get the pixel co-ordinates of the 4 corners of each of the 64 squares?
You can do this with a traditional chessboard pattern (i.e. black and white squares with no gaps) using cvFindChessboardCorners(). You can read more about the function in the OpenCV API Reference and see some sample code in O'Reilly's OpenCV Book or elsewhere online. As an added bonus, OpenCV has built-in functions that calculate the intrinsic parameters of the camera and an array of extrinsic parameters for the multiple views of a planar calibration object.
I would:
apply threshold and get binarized image.
apply SobelX filter to image. You get an image with the vertical lines. This belong to the sides of the squares that are almost vertical. Keep this as image1.
apply SobelY filter to image. You get an image with the horizontal lines. This belong to the sides of the squares that are almost horizontal. Keep this as image2.
make (image1 xor image2). You get a black image with white pixels indicating the corner positions.
Hope it helps.
I'm sure there are many computer vision libraries with varying capabilities and licenses out there, but one that I can remember off the top of my head is ARToolKit, which should be able to recognize this pattern. And if that's not possible, it comes with a set of very good patterns that are tailored so that they can be recognized even if they're partially obscured.
I don't know ARToolKit (although i've heard a lot about it) but with OpenCV this processing is trivial.