News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPRiot.com:
Reducing a Map Path Using Douglas-Peucker Algorithm
April 29, 2011 @ 12:40:42

On PHPRiot.com there's a new tutorial showing you how to use the Douglas-Peucker algorithm to make the pathing on your map the simplest possible (the fewer points the better) having serious benefits a wide range of users, most notably those on mobile devices.

When drawing a path on a map (for instance, the directions from point A to point B) it is important to consider the limitations of the device you're drawing the path on. In this article, I will show you how to reduce the number of points in a path so the path can be displayed with minimal loss of quality on devices such as iPhone or Android-powered devices that may struggle with an extremely large set of points.

Using the GTFS service's data, he's been creating maps for an iPhone application. Naturally, a path with 700 points would take a lot of resources to render. Using the Douglas-Peucker algorithm he can reduce it down to a much more manageable 70 points. He explains the algorithm briefly and hows how to implement it in PHP with three classes - ShapePoint, Shape and ShapeReducer. The resulting reduced dataset is then passed directly over to a Google Maps for plotting.

0 comments voice your opinion now!
douglaspeucker algorithm reduce tutorial map point path


Chris Jones' Blog:
Reducing diskspace of your Oracle Instant Client install
April 09, 2009 @ 10:29:16

Chris Jones has a recommendation for those compiling Oracle support into PHP - there's a simple way to reduce the amount of disk space that your Instant Client install uses - a "only what's needed" setup.

Most PHP OCI8 users link PHP with the Oracle Instant Client (IC) libraries that handle the underlying "client" (i.e PHP OCI8 extension) communication with the database. IC is relatively small for the features it gives, and is very easy to install. A ZIP or RPM download unpacks a few libraries. [...] Although IC isn't particularly big - and it's getting relatively smaller all the time - there are two ways to reduce its size.

His two recommendations are to use the lite client version instead of the full-blown one (only has common character sets) or you can just remove the JDBC/ODBC/OCCI libraries from the full install. He lists out the files that are actually needed by the OCI8 extension to compile correctly.

0 comments voice your opinion now!
reduce disk space oracle install instant client oci8 compile


Ryan Grove's Blog:
Minify combines, minifies &caches JavaScript & CSS files to speed up page loads
May 04, 2007 @ 16:52:00

This new entry on Ryan Grove's blog today points out a handy little tool written in PHP that can be used to (somewhat) reduce the time it takes for your pages to download.

Minify is a PHP library that attempts to fix this problem by combining multiple CSS or JavaScript files into one download. By default, it also removes comments and unnecessary whitespace to decrease the amount of data that must be sent to the browser. Most importantly, it does all of this on the fly and requires only a few simple changes to your existing web pages.

He gives a before and after example of the things it can do - mainly combining multiple tags (like link and script) and their information into one. Check out its page on the Google Code site for more information.

0 comments voice your opinion now!
css javascript combine reduce load time css javascript combine reduce load time



Community Events





Don't see your event here?
Let us know!


series laravel library list bugfix podcast introduction application release configure threedevsandamaybe wordpress code developer community interview install language api symfony

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework