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

1
vote
0answers
590 views

How to calculate corner coordinates of static Google Map image using PHP?

How can I calculate the corner coordinates of a static Google Map image, like the one fetched with this URL, using a little PHP script?
4
votes
2answers
1k views

How can I query Postgres tables directly from OpenLayers?

I have a map that is being hosted with the components of OpenGeo. The map contains WMS layers of millions of parcels and some rail stops. All of our spatial data is on PostgresSQL. Right now the only ...
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 ...
0
votes
2answers
354 views

PHP PostGIS to geoJSON missing required parametar error

I'm using this PHP PostGIS to geoJSON script: https://gist.github.com/bmcbride/1913855 But I keep getting this error: 'missing required parameter: geotable' This is my code: # Retrive URL ...
0
votes
3answers
354 views

REST backend framework for routing?

I'm looking for a framework in Java or PHP to use it as backend for a mobile application. It should (if possible) implement REST services, geo functions for routing and CRUD services. I found the ...
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
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 ...
0
votes
2answers
1k views

How to develop a PHP GIS Applicationfor land parcel search?

I know this question has been asked numerous times but not from this angle. I am proficient in PHP and PHP Frameworks, my interest is now on GIS with the sole intent of creating a map solution where ...
2
votes
1answer
675 views

How to get polygons from PostGIS table to PHP array best?

Currently I fetch polygons from a database table using ST_AsText(). The results are in text format, like the following. POLYGON((84 104,212 48,321 122,243 179,275 238,131 240,84 104)) I am not ...
1
vote
1answer
366 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 ...
0
votes
1answer
207 views

What should I start with WebGis Mapserver?

I'm not native English Speaker and I'm a graduated student who want to have a master degree in software engineering. I have a thesis relative with "Build a WebGis for air pollution in Vietnam's ...
-1
votes
1answer
135 views

Shp2pgsql - exec() not allowed on external server

Me and my collegue are using the shp2pgsql and psql commands in php code (a Drupal module to be precise). We put these commands in a php variable and use the exec() command to execute them. This ...
3
votes
0answers
140 views

Shapefile and geocoding to retrieve an area name

I'm very new to GIS and all things geospatial! I have dbf, prj, sbn, sbx, shp and shx files that have been provided to me. The shapefile contains information on parts of the country that have been ...
0
votes
1answer
904 views

how to configure WFS layer with openlayer in PHP wampserver with windows?

I have a problem to display WFS layer outside the Geoserver. My code working fine in geoserver, but when I tried my code in wampserver(PHP), only WMS layer is being to displayed. I gone through many ...
0
votes
0answers
57 views

How a PHP script can perform point, line and polygon operation on Geoserver and PostGIS (+wkt) [duplicate]

I want to show my shape file and LULC map (vector and raster data) on internet explorer (locally). How should I configure PHP and Geoserver so that I can show data on localhost on an IE or browser? It ...
3
votes
1answer
2k views

ESRI Javascript API Export to Shapefile and CSV

I am working on a Javascript Web Application using the ESRI Javascript API v3.3. My application allows the user to edit and query data and also provides a table for attributes. I would like the user ...
5
votes
2answers
938 views

How to find the nearest land mark from a given longitude and latitude?

I have a table called osm_places with place_name geometry, place_type and many other info related to the city. My database system is PostGIS. My requirement is: Given a latitude and longitude ...
2
votes
1answer
661 views

How to visuilze PostGIS data in GeoJSON format with PHP

I need to visualize PostGIS Geometry column as an overlay of a Leaflet tiled Map. I started a question here ,but didn't get any simple and satisfied answer. So I am starting this question. I got an ...
8
votes
2answers
1k views

Nearest point on a line ( Spherical / Mercator projection )

I have a line (Ax,Ay - Bx,By) over a mercator projection (google maps) and a random point (Cx,Cy) nearest to that line, i would to know the closest point (transparent blue on the image) over that line ...
2
votes
4answers
761 views

Query Postgis Table with PHP

Would you be so kind as to help me with the following in OpenLayers. I need to be able to use the coordinates from a user click in a postgis query. To catch the coordinates of a click I built a click ...
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 ...
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 ...
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
0answers
353 views

How to visualize MBTiles with OpenLayers using a PHP tile server?

This is repost as didn't get my expected answer. Please help me as I am newbie. I have setup the PHP Tile Server 0.1 and when I am calling the PHP server it showing the following Now I am triyng to ...
4
votes
2answers
870 views

PHP tile server

I am newbie in PHP. I am using tileserver.php to serve my *.mbtiles as web map. I have configure it and when I am trying to access the localhost it replying like following Now please help me to ...
2
votes
2answers
172 views

Can PHP be used to set the XY, zoom of a Mapbox.js map?

All, Is there a way to set the xy and zoom level of a map using the URL of the site that is calling it? I'm thinking of a site I'm using now, built on php, which has mapbox maps built in javascript ...
3
votes
2answers
690 views

Correct Use of MBTiles PHP Script

I have installed the OSGeo4W web server tools on a Server 2008 machine, and I would like to serve MBTiles to Leaflet. I have tried these: Zverik's mbtiles-php Infostream's mbtiles-php fork The ...
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 ...
0
votes
1answer
435 views

php for “selected feature” - Combination of Openlayers and php-Form

I use a postgres db, geoserver and openlayers to display a map with a wfs-t Layer that displays the geometry column of my table. Now I use control select to call a popup which contains a form to edit ...
1
vote
0answers
2k views

How to populate data from postgresql using dynamic php\html listing

In the form I created, I need two fields to be dynamically populated from the database while the other fields will be manually entered and push to the database. I have written a script that is able ...
4
votes
1answer
829 views

Using PHP and JavaScript to dynamically create shapefile or KML

While I have used GIS software (ArcGIS and just started playing with QGIS at home), I have never looked into the code or file structure of shapefiles. I am working on a project for my work, a ...
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
0answers
834 views

searching GeoJSON features

After googling for many days and reading the OL documentation, I don't understand well how the filterToParams in OpenLayers.HTTP protocol should work, what I'm trying to do is to find and display the ...
3
votes
2answers
3k views

Adding georeferencing data into tiff image

I want to create a georeferenced .tiff file from a .png file. So I convert the .png into a normal .tiff file using the following command line : convert image.png image.tiff Here, all works fine, I ...
2
votes
2answers
2k views

Fixing the OpenLayers MBTiles Example

I've been trying to implement the OpenLayers Example for reading MBTiles: http://projects.bryanmcbride.com/ol_mbtiles/ Right off, the link to the necessary mbtiles.php script was broken, but I found ...
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
0answers
199 views

OpenLayers Icon e PopUp

Ciao, sto creando una pagina in php con una mappa ... in OpenLayers Examples ho trovato due interessanti esempi: esempio che mostra come usare diversi tipi di poupup ...
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
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
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
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 ...
5
votes
1answer
12k views

Drawing polyline that grows as the car moves by taking data from MySql and PHP in Google API

I wanted to show the polyline on google Map as car moves with animation (like in this site: http://econym.org.uk/gmap/example_cartrip2.htm) by taking data from MySQL and PHP. For that i refered the ...
0
votes
1answer
744 views

Reference materials for learning Google API V3 with PHP and MySQL (tracking)

I am new to this Google API. Now i wanted to learn Google API with PHP and MySQL. Actually i wanted to create an application that will track x,y coordinates coordinates on real time bases for ...
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. ...
6
votes
1answer
292 views

Trigger geocoding without having to visit page

I'm using Google's geocoder to store results in database then display them on a map on another page. The problem is that each company profile page needs to be visited before it's geocoded. Is there a ...
0
votes
3answers
158 views

Postgres geometry in a pdf file with php

Is there a way to draw a postgres geometry in a pdf file using a php script? Thank you.
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 ...
4
votes
2answers
2k views

Using PHP with a web application?

I have been working on creating a web mapping application using ArcServer 10 and the JavaScript API. Recently I was told that queries need to be run using PHP due to prior work by another team. The ...