The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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.

76 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
120 views

Position of vehicles relative to lead vehicle

I have a set of vehicles (think railway) that are in a (semi)fixed formation. I know the lead vehicle and I know the GPS coordinates of the lead vehicle at any given time. Sometimes, I can rely on the ...
5
votes
0answers
238 views

What is the structure of Standard Interchange Format (SIF) used by spatial data providers?

What is the structure of Standard Interchange Format(SIF) used by navteq and other spatial data providers? Any documentation/sample files? Is there a SIF parser available in C/C++/Java/PHP ?
3
votes
1answer
498 views

Find if lat/long point is inside an area

I have got data using OpenStreetMaps Ways of many areas. I would now like to write a function which would return "true or false" if an single latitude/longitude point is found in that area or not. I ...
2
votes
0answers
262 views

dynamic zoom linked to a drop-down menu

I would like to get a dynamic zoom linked to a drop-down menu. For example I have a list connected to my database with all the regions and I would like that when the user choose a region that a zoom ...
2
votes
0answers
556 views

Multiple tables from PostGIS to Leaflet with PHP and jQuery

I recently found this example: https://northlandia.wordpress.com/2015/04/20/connecting-postgis-to-leaflet-using-php/comment-page-1/#comment-627 It is very helpful and it works fine for one PostGIS ...
2
votes
0answers
97 views

How to project coordinates in spatialite using PHP?

I'm using a spatialite database in a PHP program and I need to simulate an "identify" on a polygon layer (EPSG 32632), using point whose coordinates are dinamically generated. I know that this query ...
2
votes
0answers
1k views

How to calculate all distance from GPS route using date time and coordinates for php?

I have big GPS data which have 4 columns for id, date time, lat, long. I wanna implement Haversine's formula to get distance between 2 nodes. But if I want to find all distance from start to last ...
2
votes
0answers
89 views

Knowing byte address and byte length of “strip” in LZW-compressed GeoTiff with vanilla PHP?

I have a situation where I need to read cell values from a GeoTiff using vanilla PHP, and while I've been successful reading values from an uncompressed TIF (~800MB), I'm having difficulty reading ...
2
votes
0answers
123 views

How to cut parallelogram with intersecting line?

I have a very specific set of circumstances under which I need to break a parallelogram into 2 pieces. The parallelogram obviously always have 4 vertices and the intersecting line intersects the ...
2
votes
0answers
501 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 5....
2
votes
0answers
219 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
22 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
0answers
2k 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
0answers
21 views

Count points that are within certain radius within a polygon

I have 4 table, I want to count police that are within 5km of a point (dam), schools and clinics within 3km same dam. So far I do get the results if I'm focusing on one table $str = pg_query($conn, "...
1
vote
0answers
37 views

Problem with loading big data (GeoJSON) via PHP

I have a problem with loading (big) data via PHP from a spatial database. I let run this project on a localhost Apache Server. From a data count of about 30.000 edges I get an error VM885:1 Uncaught ...
1
vote
0answers
22 views

Display all trajectories location along with dummy location

I'm trying to display the all trajectory location on Google map along with dummy location. I have tried to display dummy locations with sample location and it works fine, but when I try to connect to ...
1
vote
0answers
181 views

GeoServer returns 401 unauthorized when requesting data via openlayers

When using the line crossOrigin: 'anonymous',, it returns 401 unauthorized response. When commenting out that line it works, but I have to be log in to the GeoServer. Update: I have changed the ...
1
vote
0answers
43 views

Which polygons intersect rectangle in PHP/Linux GDAL?

I'm developing a website where I want to test which polygons from a shapefile intersect a given rectangle. Using PHP, I thought about using exec() function, calling a GDAL program, like ogrinfo. ...
1
vote
1answer
1k views

Multiple markers on Google Maps using JavaScript, PHP and SQL

I am trying to query the MySQL database that has a table with firstname, longitude, latitude in it. I want to get the longitude and latitude and display them as multiple markers with the firstname as ...
1
vote
0answers
502 views

Google Maps API - Multiple Polygons

I'll be generating my JSON file using PHP and SQL for displaying around 200 polygons, on a map. I've managed to test the concept with two polygons but still struggling. I'm not experienced with JS or ...
1
vote
0answers
226 views

openlayers-automatically adding the layers on clicking dynamic checkboxes without actually specifying all the published layers attributes

My tryonly.php looks like following I also have categories.php to add layers with a common category or create a new in the database There is no error in the code below, where i have been using ...
1
vote
0answers
158 views

Unable to upload shapefile using geoserver REST API and php

I am not able to upload shapefile and create a store in Geoserver using its rest api and Php. below is my php code <?php // Open log file $logfh = fopen("GeoserverPHP.log", 'w') or die("can't ...
1
vote
0answers
723 views

Response not working in AJAX/PHP

I am working on Google Maps API, where I have made a dynamic marker popup. Now I want to take the user information from the popup and save it to my MySQL database without reloading the page. So I am ...
1
vote
0answers
916 views

Parsing GeoJSON in PHP?

i am trying to parse GeoJson from database with php but somehow i got an error and i cannot found any error in my script. here my script $id = 1; $db = new mysqli("localhost","root","","skriboo"); $...
1
vote
1answer
4k views

Adding markers using OpenLayers 4

adding markers works fine using OpenLayers 2 but now I need to add markers using OpenLayers 4, how can I do this? my code as follows: var markers = <?php echo json_encode($data)?>; var ...
1
vote
0answers
179 views

Pure PHP Library for Geometry Operations 7

I am working on a php project on a shared webhost. so I am limited into mysql and php. I want to do some geometry operations in php side. In fact it is a routing algorithm which works in php. I need a ...
1
vote
0answers
437 views

Password protected WMS in Openlayers 4

I would like to use OpenLayers to access a Wms, which is protected by a password. Unfortunately, I find no solution to this problem. My problem is in particular that I want to prevent that password ...
1
vote
0answers
42 views

Cannot connect to current version of enterprise database (PostgreSQL) through PHP

Very new to PHP, and working on a simple edit page. I'm connecting to multiversioned Postgresql database that I set up in ArcMap using a PHP/HTML file. I'm using the pg_connect command with host/...
1
vote
0answers
103 views

Rearranging a list of coordinates within a list of pair simultaneously while running a php code

The question is related to rearranging a list of coordinates within list of pair while running a php code simultaneously. I am new with php language and managed somehow to parse a kml file in php. The ...
1
vote
0answers
143 views

Pgrouting PHP don't work with Openlayers and GeoExt

I'm working with this source code. Html file (Openlayers + GeoExt) seems to work fine - everything shows up correctly but when I click on map nothing happend. I use my OSM data loaded to postregsql by ...
1
vote
0answers
1k views

Can I retrieve row_to_json from PHP for a table in PostgreSQL?

I am able to retrieve JSON from a PostgreSQL database using this command: SELECT row_to_json(fc) FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features FROM (SELECT '...
1
vote
0answers
89 views

coords of the previous drawned polylines are sent to PostGIS with a form when sending coords of a new drawned polyline

I have a leaflet map in which I can draw some polylines and send their data and coordinates in a PostGIS database with Ajax and Php. When I've created a polyline and send their information in my ...
1
vote
0answers
159 views

Markers display with leaflet and javascript

I have a problem displaying data relating to schools on a div 'info' when click the marker with leaflet and javascript: here's the error: Uncaught TypeError: layer.setStyle is not a function
1
vote
0answers
119 views

How do I increase the 2mB uploadifive limit in Geoserver installed on AWS?

I've recently migrated a site from Geoserver 2.1.4 installed on a hardware server to Geoserver 2.7.0 installed on an Amazon Web Service. The site uses uploadifive to enable the user to upload a pdf to ...
1
vote
0answers
35 views

Updated GPS coordinate shows rotated point

So I have a GPS coordinate: 8.6258,47.3325 Which I use as my origin. Then I have the path of an object that has been moving around based on the ENU position, say: -10, 12 //east, north in meters -8,...
1
vote
0answers
1k views

How to publish layer on geoserver using rest api with PHP CURL

I'm working in a project that I need to publish a layer automatically on geoserver. Searching I discover that the REST API can help me. Studying the REST API I saw that I need to use cURL to do that(...
1
vote
0answers
248 views

CentOS 6.5 - After compiling gdal.so: Unable to load dynamic library

CentOS release 6.5 (Final) Linux version 2.6.18-028stab101.1 (root@rhel5-build-x64) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46) I'm trying to Install Cartaro CMS (http://cartaro.org/). GeoServer, ...
1
vote
0answers
1k 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
142 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." 0)')...
1
vote
0answers
107 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
0answers
371 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
4k views

Smooth replay of gps points on google map

When first the google map is loaded we load data using php codes in the backend and draw a line connecting between each lat long. There after we check if the lat long point have some ...
1
vote
0answers
896 views

parsing an osm-file with PHP simpleXML :: getting a few more tags

I am new to PHP's SimpleXML. update: The original version of this question was derived from here: OSM Data parsing to get the nodes with child I am thankful that hakre offered a great example in ...
1
vote
0answers
267 views

change the area in a osm-request: from lon & lat to whole country

I am new to PHP's SimpleXML. the script below makes a starting point for my project. Below I have added my own answer to the question, how to refine the code to ad more tags. I want to filter the ...
1
vote
0answers
30 views

How to send variables from gis addin own web browser to gis file

I am a complete beginner with GIS. So I want to be able to go to the coordinates in arcmap I fill in in my php page. I've got this now: The variables inserted in the textfield should be the ...
1
vote
0answers
2k 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?
1
vote
0answers
581 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 ...
1
vote
0answers
5k 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 ...
1
vote
0answers
2k 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 ...
1
vote
0answers
286 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 (http://openlayers.org/dev/...