You are here


GIS Developing Follow Me with PHP--How to input CSV file with WKT into MySQL

If you have one CSV file that containing the WKT format SQL spatial data, how to input the data into MySQL?
For testing, at first create a table containing spatial colomn:

CREATE TABLE `geometry` (
`id` int( 11 ),
`geom` GEOMETRY ,
PRIMARY KEY ( `id` )

In MySQL's operation software, Admin or PHPMyAdmin, you could run such SQL code to input the data:

"INSERT INTO geometry (id, geom) VALUES ('1', GeomFromText('LINESTRING(1283074 10562093,1283074 10562093,1283074 10562093)'));


GIS Developing Follow Me with PHP-- Use Cache to Speed up your Web Map Server or other WebServers

Are you managing or taking care of a Web Map Server, Web Feature Server or other Web Servers? Have you been puzzled by the high traffic and insufferable speed of your server? Have your custumers always complained that  they must wait  one one year to get the map when they sent their queries to the server?
The following solutions could help you to sovle your problems.
1. Client Cache: Sets the expired time of pages in browser in the client side
2. GZIP: Uses gzip when transfering the data to accelerate

GIS Developing Follow Me with PHP--Load GeoAttribute from DBF dBase format

1. What is DBF dBase Format?

dBASE was the first widely used database management system or DBMS for microcomputers, published by Ashton-Tate for CP/M, and later on the Apple II, Apple Macintosh, UNIX [1], VMS [2], and IBM PC under DOS where it became one of the best-selling software titles for a number of years. dBASE was never able to transition successfully to Microsoft Windows and was eventually displaced by newer products like Paradox, Clipper, FoxPro, and Microsoft Access. dBASE was sold to Borland in 1991, which sold the rights to the product line in 1999 to the newly-formed dBASE Inc.


GIS Developing Follow Me with PHP--Visualize Geodata and create map in raster image

At least you should have some minimal experience with the real coordinate, screen coordinate, which could be called image coordinate. The real coordinate you maybe use everyday mostly is Cartesian coordinate system, the XY coordinate is describing in this image.

The Cartesian coordinate system allows negative coordinates. You use the Cartesian plane as a surface that represents the world in which your graphical objects exist. For example, a triangle can be defined by three points (2,5), (5,2), and (2,2), as shown in image:

GIS Developing Follow Me with PHP--Load GeoInfo from ESRI Shapefile format

1. Shapefile Description

Shapefiles are used widely and in many GIS software. Shapefiles can be created with the following four general methods:

1.  Export--Shapefiles can be created by exporting any data source to a shapefile using ARC/INFO, Spatial Database Engine (SDE), ArcView GIS,or BusinessMAP software.

2.  Digitize--Shapefiles can be created directly by digitizing shapes using ArcView GIS feature creation tools.

3.  Programming--Using Avenue (ArcView GIS), MapObjects, ARC Macro Language (AML) (ARC/INFO), or Simple Macro Language (SML) (PC ARC/INFO) software, you can create shapefiles within your plugin programs.

GIS Developing Follow Me with PHP--Load GeoInfo from Mapinfo MIF format

GIS Mapping in PHP is a very nice tutorial to tell you how to create a webmap using PHP. In its Part II the author introduces a easy way to load the geographic coordinates from Mapinfo MIF format and realize it in raster image format with PHP's image function. The author has done a nice job and his code can parse one MIF example data with Line, Polyline and Region geometries objects. Thx! But not finished yet!!!!

Try to read the MIF format standard in, or you could find that MIF contains the other graphical objects, they are as listed:

GIS Mapping in PHP(T)

GIS Mapping in PHP: Part 1
Published online at


There are a number of great online GIS ( Geographic Information System ) solutions out there, ranging from Mappoint to Mapquest to some cool PHP projects. However, it is still nice to be able to be able plot you own data and put some basic mapping utilities on your site with a minimum of fuss and bother. Over the next couple of articles I will hopefully be able to give you a few pointers on how to create you own basic GIS system for free. I do not claim to be a GIS expert, and there may be better ways to do things, but hopefully these articles will give you a start in the right direction.


How to enable gzip compression with Php(T)

Enabling Gzip Compression

In many forums and on many webpages it has been widely proclaimed that to enable gzip compression using php is as easy as adding a single line of code at the beginning of each page. This is not false, however it is not the best way of doing it. Before continuing, here's the code. It takes advantage of Php's buffered output and buffers all output of the script until the Php engine has completed, and then runs all the output through a special function that gzip compresses it before sending it on to the browser.

Here is the code. Just place this at the very top of all your Php pages and it will send gzip-compressed output to the browsers.


MVC Frameworks Written in PHP

MVC Frameworks Written in PHP

Frameworks for implementing the Model View Controller pattern in PHP

Subscribe to RSS - PHP
Framework PHP 4