Questions tagged [php]

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

Filter by
Sorted by
Tagged with
22
votes
5answers
2k views

Seeking developer-friendly web GIS? [duplicate]

I'm a recent Computer Science graduate who prides himself on his knowledge of software development and problem solving, but has no idea how GIS systems work. (Read: I'm a programmer.) I've been ...
18
votes
1answer
24k views

Passing Filter Parameters to GeoServer WFS via URL?

I'm trying to use PHP's CURL function to fetch geoJSON information from a GeoServer instance. I'm doing this using url variables rather than trying to construct a full xml GetFeature request. However,...
7
votes
6answers
15k views

Getting all vertex lat, long coordinates every 1 meter between two known points using PHP?

I am currently using php to try and write code that will take a start point and end point latitude and longitude coordinate pair in decimal degrees and calculate the latitude and longitude of every ...
4
votes
1answer
2k 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 this....
5
votes
2answers
4k views

How to read GeoTIFF using PHP?

My current pet project involves creating a web service that uses the CGIAR SRTM worldwide elevation data set. Each request to the service will query for elevation data from a small geographic area. ...
3
votes
4answers
3k views

How compile/install php-mapscript on Ubuntu 16.04

I need to upgrade from Ubuntu 14.04 to 16.04 but php5 is not officially supported on Ubuntu 16. I install php5.5 by ondrej repo https://askubuntu.com/a/756186/483814 but when I try to install php5-...
10
votes
2answers
9k 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 ...
4
votes
1answer
15k views

Zoom to polygon bounds on click. Leaflet ´, GeoJSON

I have a leaflet map with a lot of polygons (borders). I would like to zoom to the bounds on the polygon, when the user click. Until now its only possible for me to zoom to the the bounds of all the ...
2
votes
3answers
2k views

Load a shapefile in PostgreSQL database with PHP

I am trying to load a shapefile in a PostGIS database using the exec() command. I have read the format I have to follow from here and I checked several similar questions from the forum. Based on the ...
1
vote
1answer
2k views

Buffer along a route

I'm using Googlemaps service to plot some marker on the map. All markers are stored in a postgresql table, named "locations" and that has a location column (data type to geometry). When the user ...
5
votes
2answers
2k views

Adding an external WMS service using REST service with Geoserver

I'm trying to add an External WMS layer to geoserver with a PHP page, using the REST service of Geoserver. I've already read the tutorials for creating the geoserver features (http://docs.geoserver....
4
votes
1answer
1k views

Geojson in postgis Geometry : Z dimension error

i had this php code : $geom1='{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-32514.400906806848,4810093.013501738],[-32877.47679116143,4809500.626532529],[-34473.099756614494,...
2
votes
1answer
4k 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
1answer
178 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
1answer
824 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 ...
1
vote
1answer
1k views

leaflet zoom map while clicking outside of the map

I know this may be a duplicate question. I'm new in this field.I am developing a website in php here I have one leaflet map for Kerala state. I'm drawing this using the goejson using leaflet. So my ...
0
votes
1answer
414 views

Using circle as polygon for querying PostGIS [closed]

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 ...
0
votes
2answers
6k views

Leaflet : How to update polyline ? Live Tracking

var ColorVar = '#bd0026'; var firstpolyline = new L.Polyline(polyList, { color:ColorVar, weight: 8, opacity:0.8, smoothFactor: 1 } ); ...
3
votes
2answers
3k 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 ...
2
votes
1answer
1k views

Point to Line Calculations

We are looking to take a point and compare it against the nearest point to an adjacent line. All values are in lat/long. We tried using some of the concept found on the board but found it did not ...
2
votes
1answer
542 views

Nearest Neighbor in PostGIS [closed]

I would like to write a php script that takes a coordinate as input and finds the nearest vertex of the road_network. Is this possible with ST_ClosestPoint? Or do I need nearest neighbor method? ...
2
votes
2answers
2k views

Script to extract UTM Zone using Range and Meridian information

I am looking for a python 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, Northing, Range and ...
1
vote
3answers
851 views

Storing shapefile in PostgreSQL database as a table using PHP?

I want to create a table from a shapefile in PostgreSQL. To do that, I can run this command in cmd: shp2pgsql -s 4326 -W LATIN1 E:\Any\THA_adm public.test123 | psql -h localhost -d DATA -U postgres -...
1
vote
1answer
2k views

GPS tracking data string format for GRTQ device

I get GPS data from tcp (php socket), but for some devices (GRTQ) I will get an unreadable string. First devices sends: *HQ,XXXXXX,41,4#V1,time,A,**Lat**,N/S,**Lng**,W/E,000.00,000,date,FFFFFBFF,432,...
1
vote
1answer
2k 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
1answer
384 views

Identify the direction of traveling road segment

I'm using pgRouting to find the least congested path using time as the cost metric. I am using average speed between two nodes to calculate time taken to travel in a segment. In pgRouting there is a ...
0
votes
1answer
379 views

What should I start with Web GIS MapServer?

I'm not native English Speaker and I'm a graduated student who wants to have a masters degree in software engineering. I have a thesis relative with "Build a Web GIS for air pollution in Viet Nam's ...