Weather radar overlay on MapKit - ios

I'v searched hi and low and being a novice developer I'm looking for some help. What I need to do is display weather radar over a map for a app I am trying to develop. Most of the content I have run across is outdated. My project is created using storyboards, looking for any assistance available with this issue. I have all the API's and associated info.
Thanks,

Creating an overview can be quite a cumbersome task. I found this tutorial to be a good start.
Basically the tutorial says that these steps have to be done:
I would recommend a 600 ppi tiff. My tiff had a resolution of about 4000*2000 pixel.
downlaod and install gdal: http://www.kyngchaos.com/software/frameworks. The installation of gdal is no joy. I can't explain every step here. Basically: first install using the complete installer. Then install numPy. Then copy gdal in the path with the terminal.
load the tiff into Google Maps to get the coordinates of the 4 corners.
create the vrt file with gdal. The command will look similar to this string: gdal_translate -of VRT -a_srs EPSG:4326 -gcp 0 0 7.435822 46.953453 -gcp 2285 0 7.460397 46.953453 -gcp 2285 1479 7.460397 46.942342 -gcp 0 1479 7.435822 46.942342 MN_A.tiff MN_A.vrt
Create the tiles with MapTiler. The Mac version didn't work for me, but the Windows version did the job.
You need to add these tiles to the project and create a folder reference for them. The code of the WWDC video Session 127 shows how that works.
repeat step 3-5 until the overlay works fine.

Related

How can all the icon images for Corona SDK apps be generated from a single image file?

To properly customize the app icons for various platforms when using the Corona SDK game engine, a fairly large set of image files of specific sizes needs to be included in the project's root directory and specified in the build.settings file (detailed requirements are found in the Building/Distribution Dev Guide.
Is there any way to easily generate all the required image files for iOS and Android builds starting with a single, hi-res image file?
I use generator Icon Generator for Corona SDK with my previous game.
Solutions using various image processing apps can be found on the Corona Community Forum. My own solution was to write a Script-Fu script in Scheme for GIMP.
For those who are interested, the script (make-corona-icons.scm) and its README (with bare bones installation instructions) can be found in this public GitHub repository. GIMP, the open-source cross-platform "GNU Image Manipulation Program", is free and excellent and can be downloaded here.
I use makeappicon.com. It has treated me well for many years.

Using LibTiff with Delphi

I'd like to use LibTiff with XE3 to access image meta data information from TIFF files.
I need to find the number of pages inside tiff and their sizes.
I suggested LibTiff because I need the fastest possible implementation of reading tiff image meta data.
The only link I have found is not working anymore:
http://www.awaresystems.be/imaging/tiff/delphi.html
OK, Internet Archive has returned back to operational state, and here is your download:
LibTiffDelphi, full version. Large download (approx 1.39 megabyte), includes Debug and Release versions
Well, the download links at that site do appear to be down. You could try downloading from here instead: http://www.vdebris.comli.com/wp-content/uploads/2009/09/libtiffdelphi_3_9_1.rar
I think you could use Mike Lischke's GraphicEx to solve your problem. The TImageProperties record that is made available by the TGraphicExGraphic class appears to have what you need.
found that code working with *.tif and used graphics + lib for solution building TIF SPLITTER
not sure if it helps to solve your problem

OpenGL ES Programming Guide Particles example

I am trying to make the particle system example given in the book OpenGL ES programming guide to compile in iOS 6 but I don't seem to be able to make it work. For reference here is the web site of the book:
http://www.opengles-book.com/
The code can be downloaded from Google Code, see instructions below:
http://code.google.com/p/opengles-book-samples/wiki/Instructions
The code is in chapter 13.
Has anyone came across this and were able to make it work in iOS 6? I had made some modifications but still no joy.
Follow these steps:
Open "Common.xcodeproj" located in "/opengles-book-samples/iPhone/Common/"
Select to build for device or simulator and build.
After Build Succeeded close the Common.xcodeproj.
Open Finder and from the menu Go>Go to Folder... type without quotes "~/Library/Developer/Xcode/DerivedData/" and find the folder called "Common-bkoronpjvpvwbxgdgxbwiukcqwaz" inside folder go to : /Build/Products/ and copy "libCommon.a" to ParticleSystem project.
Build&Run particle example.
That's it. :)
Good luck.

Why are PNG images larger in the iOS app bundle than in my project?

I am in the process of updating Hungry Helga (iPhone and iPad versions) for iOS 6, and all of the PNG files in my new app bundle archives are between 20 and 40 percent larger than they were in my past releases. Of course, this is putting me over the 3G download limit of 50 MB so I'd really like to figure out what's going on.
I am currently using version 4.5 of Xcode on OSX 10.7.5. If I recall correctly the previous version was built with Xcode 4.2. I tried turning on and off PNG compression in the build settings but that had no effect on the image sizes in the bundle.
To give a concrete example, my largest PNG image is 1.9 MB as a source asset. It is 2.1 MB in the old app bundle, and 2.5 MB in the new app bundle.
Did Apple change the way the PNG compressor works or is there maybe a setting that I'm missing or something?
I do not work for Apple nor do I have any inside information - however, I did poke around and have some theories. If you use terminal you can cd into the Xcode.app and find pngcrush there:
$ find . -name pngcrush
./Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush
If you then run:
./pngcrush -?
you find some interesting tidbits:
| It was compiled with LLVM 4.2.1 Compatible Apple Clang 4.0
(tags/Apple/clang-420.0.12) and modified by Apple as indicated in the
sources.
and
-iphone (optimize for iPhone OS)
Since I too saw that some large pngs where also much larger in the bundle than the original (which I had previously crushed myself!), I wanted to see how Xcode uses pngcrush. I used an old UNIX trick:
move pngcrush to xpngcrush
create a new executable shell file that calls pngcrush with the same argument list
log the arguments into a text file in /tmp
What I found was that Apple calls pngcrush as:
pngcrush -q -iphone oldFile newFile
One can infer from this that this Apple specific feature of pngrush was designed specifically to tailor the image for iOS. I say tailor, not crush.
Does Apple really care if your png is the smallest possible file, to save the greatest amount of space? I'd argue, not really - the devices have fairly large file storage space. Do they really care if your app downloads really fast? Again, I'd argue not really, since the user is going to assume the time is related to the size of the app, and that that is under the control of the developers.
However, what the user is going to hold Apple accountable for is the launch speed. From the first tap to when the app starts doing something - people will believe that is all the speed of the device (which we developers know is not strictly true). With the new iPad3, some of the launch images are now really big, so what can be done to make loading them as fast as possible?
I don't know the answer to that question, but I can imagine that Apple decompresses the original image, then re-compresses it with settings that make loading it in the device as fast as possible.
PS:
1) I just disabled the crush option, and observed Xcode 4.5 copying my png files without modification.
2) To get your app size down, have you tried using JPEGs with a high quality setting - even 1? Such images will look very good and be much much smaller. Virtually all images in my app are JPEGs. You can experiment with Preview to do the conversions.
EDIT: it occurred to me there may be an elegant solution to this. That is, for really important images - ones that you want to appear as fast as possible - then use pngcrush with the '-iphone' flag. For others, use more standard pngcrush options.
One way to do this is to create a new image directory, and write a shell file that pre-processes every png with a real crusher or tje '-iphone' flag, putting the output in the original image folder (where Xcode can get them). Then turn off the automatic 'Crush PNG Files' option.
EDIT2: I entered a bug at bugreporter.apple.com and posted on the Xcode listserv - if you have an interest in this bookmark the question and come back when its updated.
EDIT3: someone gave me a link that explains in more detail the how and why of Apple's '-iphone' option ImageOptim
EDIT4: Apple responded to my bug report, confirming that they modify the images for easier processing by iOS, which may make them larger, by intent.
Xcode 5 now got changes in image compressions. the best and compressed way is to use asset catalogs.
If even using Xcode 5 and asset catalogs doesn't result well for your app, check the other relative post PNG optimization issue using pngcrush tool for more answers could be helpful
Using David H's script, I found that Xcode is also passing the command line parameter "-f 0" to pngcrush. The man page indicates that the "-f 0" will disable any IDAT filtering before compression which can result in a larger PNG file. Testing on my 1.9 MB example file from above confirms:
pngcrush -iphone in.png out.png gives the 2.1 MB result that I am looking for
pngcrush -iphone -f 0 in.png out.png yields the undesired 2.5 MB result
Now the questions are: Why did Apple change this? Will it break image loading in some way if I work around it? If not, is there a setting for this in Xcode or will I always have to use a script to filter out the "-f 0" argument?

Using EXR images in OpenCV

I'm currently working on a project with OpenEXR and I would like to implement some Blob detection algorithms. To do this I figured that I could use OpenCV as it says in the documentation that it can open OpenEXR format files.
I have all the libraries installed and working as I've been doing other things. I open a simple jpg file with openCV cvLoadImage. It works fine. But when i try to open any .exr file it doesn't seam to like it. I get a gray window where there should be the image display.
Has anyone done any tests with OpenCV and OpenEXR libraries working together? Have they worked for you? What do you think?
Thanks.
Yes, that's done, I posted a Ticket in the OpenCV project at willowGarage and they made all needed changes, you now can use OpenEXR with OpenCV as before!
Great
My HDR tone mapping algorithm will work again, cool
Have a nice programming now ;o)
Alex
Well Alex!
My news aren't really encouraging... I tried to use OpenEXR with OpenCV but it's not doing it's work. It says in the documentation that OpenCV 2.0 has OpenEXR support but...
I've searched the web to find some example of working EXR images in OpenCV but had no luck.
At this time I've developed myself a function to convert an image read with the OpenEXR libraries that uses Ilm::Rgba* structure to save the pixels of the image and convert it to char* that OpenCV uses with images. The IlpImage structure is the one I use. Actually I'm working with an example from OpenFrameworks and using they're Image structure...
It's a really early stage in my development because I had to start over...
I hope this can help you... but if you enter the world of OpenEXR it's a pretty dark world in terms of documentation, so all I can say is good luck!
Feel free to contact me and I'll see if I can help you!
This question is rather old now, but I noticed whilst reading the OpenEXR manual today that it says (whilst talking about reading named channels)
If one of those channels is not present in the image file, the corresponding memory buffer for the pixels will be filled with an appropriate default value.
I'd speculate here that the grey image you are seeing is an "appropriate default value".

Resources