PHP is a Server-Side Scripting language designed initially for web programming, but is also used as a general-purpose programming language.

learn more… | top users | synonyms

2
votes
1answer
1k views

How to insert google maps lat/lng into postgis in geometry datatype

I came across: https://developers.google.com/maps/articles/phpsqlinfo_v3 I've changed the code a bit and all process is well done for postgis database. I get the data from infobox when user clicked. ...
2
votes
2answers
1k views

How to create dynamic map images?

I have map images of my local ward (Areas geo-referenced and drawn using QGIS and Adobe illustrator. Now these maps are in .png format (Raster images). It's not a tile linked to some mapserver such as ...
2
votes
1answer
451 views

How to configure wampserver for spatialite

I am in windows 7. I installed WAMPServer. Now, I can not load spatialite libraries. It is showing warning.. Warning: SQLite3::loadExtension() [sqlite3.loadextension]: Not supported in ...
2
votes
1answer
628 views

How to write to shape file in MapGuide

Here the code I have written to a Shape file in MapGuide Open Source (in PHP running on IIS 7.5). The code is actually the modified class MarkupEditor (markupeditor.php) from the General Tracks (Gt) ...
2
votes
2answers
847 views

MySQL Query to fetch all cities and POI's near the route

I'm implementing alghorithm to search POI near the route (array of Lat, Long points). My problem is that I don't know how to calculate distance beetween line segment and POI. Look at picture that I ...
2
votes
1answer
779 views

integrating spatialite and php (sqlite3) on windows platform

anyone can give me an explanation about how to integrate spatialite with php(sqlite3)-windows platforms. I have tried to refer from this link ...
2
votes
0answers
63 views

How to get multiple dynamic custom markers on map using MapBox in MySQL and PHP?

Can anyone help me to get multiple custom markers on mapbox using lat/long from the database MySQL. I want to use 2 types of markers on the map, for which I have two separate table of lat/longs in the ...
2
votes
0answers
41 views

Calculate Moving Time

I am wondering how web apps like Garmin connect or Strava calculate a "moving time" from a gps track. For example I might record a GPS track on my Garmin GPS that has an elapsed time of 5:34:26 but ...
2
votes
0answers
18 views

arcmap envelope coordinates from webbrowser tool

So I have my own php file with textfields which I run in my add in. Now I want to get the variables from the textfields and automatically give the value of the textfields to my env.PutCoords(x,y,x,y) ...
2
votes
1answer
435 views

What software would be useful to create General Transit Feed Specification (GTFS)?

I am doing a project in which i am required to create GTFS. I look at transit google developer forum which provide a format to create feed but that completely have to done by hand (we have to write ...
2
votes
0answers
978 views

How to insert data into fusion table using php?

I am using fusion tables to generate pins over the map. now I want to insert more coordinates data into the table using php but couldn't get any exact idea how to do it? Can anyone help me for that? ...
1
vote
5answers
169 views

What is “n” in calculating tiles? [closed]

What does n mean in this formula: n = pow(2, zoom)? I using this when I calculate tiles. Thank you
1
vote
3answers
595 views

Simple WMS server

Is there a way to implement a WMS server using only php or python cgi and mysql? I can't use geoserver or mapserver and postgres and any other software as they are not provided by the administrator.
1
vote
2answers
868 views

How to read Autodesk Spatial Data File (.SDF) in PHP

I am working on an application using Autodesk MapGuide. The application is being developed on PHP and hosted in IIS 7.5. I had to create point, line and polygon geometries on-the-fly. I found a ...
1
vote
1answer
128 views

Problem with using a circle as polygon for querying PostGIS

I'm trying to query PostGIS and find some object features that intersect with a circular buffer created by the user using OpenLayers, JavaScript and PHP. I use the following code for creating the ...
1
vote
2answers
64 views

Viewing large set of polygons in PostGIS using OpenLayers?

I am prety new to GIS. I have set up a postgis database with al large dataset and a openlayers front-end to display it. But since the dataset is getting prety big I am looking for a way to only load ...
1
vote
1answer
523 views

Display Shapefile on website (Java or PHP)

i have to write an application where similar to Google Maps where i have to display a shapefile in a web application. My available technologies are Java (frontend framework: Apache Wicket) or PHP. It ...
1
vote
3answers
559 views

GEOSERVER and Php

I want to use a Php script to retrieve information from the .db file of a shapefile saved as a layer in Geoserver. I need to retrieve attribute data from the layer and present it at the client side. ...
1
vote
1answer
140 views

Problem with nested query in PhP and PostGIS

I have a simple problem regarding a nested query. I would like to select all buildings in a given circular buffer and create a kml file of those selected objects. The following query does the job very ...
1
vote
2answers
188 views

How to extract common outline of multiple polygons with code?

I'm not really asking for a chunk of code to do this, but more of an algorithm I can work with myself. For example, this is the state of Maine, obviously, and I have the points of each county ...
1
vote
1answer
2k views

Leaflet Heatmap Dynamic data layer

I am trying to add heatmap layer to my map. I have tried the following plugin: http://www.patrick-wied.at/static/heatmapjs/example-heatmap-leaflet.html From this plugin the data came from ...
1
vote
2answers
294 views

SQL Server STpointfromText comes from PHP into javascript as garbage

Sorry for the sloppy title. Here's the scenario - I have a table in SQL Server 2008 R2 It has a geographyColumn, created thusly: add geographyColumn as ...
1
vote
1answer
352 views

osm2pgsql import crashed!

I am currently importing a bz2 country file into PostgreSQL 9.1 database for Nominatim 2 using its setup.php that runs osm2pgsql. After processing the nodes. it seems to be stuck at a certain spot ...
1
vote
2answers
2k views

How to display a image from Postgres database

I have Images in bytea form in PostgreSQL/PostGIS database, i want to display them in a webpage using PHP - PostgreSQL. I got lot of examples and I worked out but not getting output from them... Few ...
1
vote
1answer
1k views

PHP MapScript API Development for MapServer

PHP MapScript Tutorial I'd like to use the PHP MapScript API and am curious how others have successfully used it to produce a site that serves up remote sensing data. I've got land surface ...
1
vote
2answers
1k views

Send XML WFS Request via PHP

I'm trying to build a web mapping app that retrieves data from our WFS server. I'd like to avoid JavaScript for the main search scripts. From what's I've read the best way to send the XML POST ...
1
vote
1answer
362 views

how to use gdal command inside php exec() function

I need to develop a webportal which will display the images generated by a GIS software package. I my development I need to run gdal command inside php exec() function. but I don't know how to do ...
1
vote
2answers
748 views

How to make distance calculated using Latitude and Longitude more accurate

I'm coding a Web App whereby users can choose their city (start) and a destination city, and find out the approximate distance between both cities, using Latitude and Longitude of both cities to ...
1
vote
1answer
142 views

Converting shapefile to KML using JavaScript or PHP?

My client needs to generate maps from shapefiles. Through my initial search, I came to know that we need to convert shapefiles to .kml then we can generate maps from google maps. So I searched for a ...
1
vote
1answer
529 views

How do I insert a geometry as WKT to SQL Server Spatial with PHP?

I have a web mapping application built on Bootleaf (Leaflet + Bootstrap). Using the leaflet Draw plugin the user can create a polygon on the map. I'd like to insert that polygon into a geometry ...
1
vote
1answer
224 views

Shortest path for a given waypoints

I have an application where the user selects some "markers" from a google maps (all those coordinates' markers are stored into a postgresql database). Right now, I can draw the route between all ...
1
vote
1answer
148 views

Is that possible to use map object ( PHP_MapScript ) instead of map file when using the MapServer?

In my previoous code, I am using openlayer WMS to load a raster data through MapServer. As you can see, the mapserv.exe call a local map file to load the raster data. I just heard PHP_MapScript, since ...
1
vote
2answers
362 views

How to get .csv file into postGIS

I am using this: COPY data_table (col1,col2,col3) FROM 'datafile.csv' DELIMITERS ',' CSV HEADER; to get csv data into my postGIS table. It works wonderfully, except I need to have a 'pk_id serial ...
1
vote
1answer
367 views

PHP Mapscript get feature / shape by index in layer

I upgraded my Mapserver version from 5.6.x to 6.2.0 (yes, big version jump here!) and I am stuck with getting a shapeObj from a layer by simply using its Index (or FID for shapefiles or GID in case of ...
1
vote
1answer
427 views

Is the PostGIS Shapefile Import Manager able to upload to phpmyadmin or only pgadmin III?

After trying to import a shapefile into pgadmin III with no success I was wondering how to successfully upload it, but also if it is possible to upload to phpmyadmin instead. In any case, how exactly ...
1
vote
1answer
592 views

Python script for GRASS - executing from PHP

I wrote the following python script: #!/usr/bin/env python import os import sys gisbase = os.environ['GISBASE'] = "/usr/lib/grass64" gisdbase=os.path.join("PATH") location=LOCATION NAME ...
1
vote
1answer
119 views

Thematic maps on Non Spatial Data in MapGuide

I need to create the thematic map on a polygon layer. But the data is not available in the layer; I am using Postgres database for that. It means I need to create the themes on layer using non spatial ...
1
vote
2answers
521 views

Script to extract UTM Zone using Range and Meridian information

Hi Everyone, I am looking for a phython or php script that will accept the Range and Meridian values of a location and use it to identify the UTM zone. I have a table that comprises of Easting, ...
1
vote
1answer
387 views

Calculate MBR envelope for different geometry shapes in different rows

I have some different kinds of geometry (Polygons and line strings) stored in my mysql database. On different rows. I know I can retrieve the envelope of one row with: SELECT Envelope(zoneShape) FROM ...
1
vote
2answers
1k views

How to get libspatialite.so file for spatialite

I am creating an application using spatialite database. I checked couple of tutorial from internet. Most of them explains the same. But the problem is I need "libspatialite.so" extension library. I do ...
1
vote
0answers
28 views

Route tracking on google map php

i have to make a software which is track a vehicle on Google map using GPS. I have almost done this project but i am stuck at a point, the client require a system that track the bus in a route. I am ...
1
vote
0answers
34 views

Install php mapscript on ubuntu 12.04 PHP 5.4

I follow this website : http://blog.geoghana.com/2013/06/28/setting-up-lampp-linux-apache-mapserver-php-postgresqlpostgis/ to install mapserver and the php extension on my ubuntu 12.04 64bit and PHP ...
1
vote
0answers
13 views

Run intersects function in PHP?

I have an old script that used to connect to a postGIS DB and basically perform: $sql="select * from mobile.regions_ne where intersects(geom_wgs84,GeomFromEWKT('SRID=4326;POINT (".$lng." ".$lat." ...
1
vote
0answers
20 views

Authenticate to geoserver using openlayers 2

I want load layers from geoserver using openlayers in php page. How I should do it? Maybe can give ane code examples? Layers not public, need authentification.
1
vote
1answer
121 views

How to update leaflet L.imageOverlay using jquery serialize without page refresh?

I am developing an application that fetches and displays raster/image maps (png, tif), into a leaflet map. However, I didn't like the page and the map refresh upon form submission. In addition, I ...
1
vote
0answers
44 views

Is there a QGIS plugin that allows users to interface with a PHP form page?

I've been looking for several days for a QGIS plugin that allows users to interface with a PHP form page. Does anyone know something that works in this way?
1
vote
0answers
29 views

Creating Interactive Map Using Something Other Than Google? [duplicate]

I have a Roleplay Forum, and I would like to add a map of my Roleplay World to the website. I would like my map to be clickable, and have each location take you to a place on the forum. I don't know ...
1
vote
1answer
24 views

Area of an EPSG 27700 polygon

I am working with EPSG 27700 polygon data in PHP. All the polygons are in the UK. The polygons do not have holes inside them. I'm hoping to be able to calculate the area of these polygons. For this I ...
1
vote
0answers
32 views

Pont to Point and Point to Line Calculations [duplicate]

We have been beeating our head against a wall trying to get point to point and point to line segment (perpindicular) to work in PHP. I posted the other day as well but did not include the code in ...
1
vote
0answers
59 views

GeoServer setup for intercepting WFS-T requests and handle them via PHP

I'm developing a web app which uses GeoServer side by side with a PHP framework. My goal is to be able to intercept WFS-T requests to update some records whenever a WFS transaction is executed ...