Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
14 views

How to read geometry data type from MySQL database using PHP

I have a table in MySQL that stores polygons. I can read this back on the command line using the following query: mysql> SELECT polygonid, AsText(thepolygon) FROM polygons; +-----------+----------...
0
votes
1answer
59 views

Uploading shapefile to PostGIS database using PHP

I want to insert a shapefile into a PostGIS database using PHP. I go through the examples and I tried the following: $command = 'shp2pgsql -s 2100 -d /D:\CHECK DATA-group\2016\Ayomi\JULY\...
0
votes
0answers
5 views

Mapserver PHP Mapscript Dynamic Heatmap

I am using MapServer 7.0.7 and PHP 5.6.36. I have a layer group in a mapfile which is dynamically generated via PHP mapscript. I would like to add a dynamic heatmap (kernel density) layer based on ...
1
vote
0answers
52 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
150 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 ...
0
votes
1answer
58 views

Spatial functions with MySQL, XAMPP, and Wordpress

I am trying to figure out how to using the ST_AsGeoJSON function in MySQL, but I keep getting an error that says that this function does not exist. I have found in the MySQL documentation that this ...
1
vote
0answers
52 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 ...
0
votes
1answer
106 views

Creating point with geometry to insert in database

I have a PostGIS table of points. With my php code and pdo, I want to add a point in it. I have the coordinates, I want to get the geometry, with ST_GeomFromText. Here is the code : $x = $_POST['x']; ...
1
vote
0answers
24 views

Which approach is faster for getting all POIs from MySQL/MariaDB with PHP/Laravel [closed]

Correct me if I'm wrong. There are three approaches to get the nearest homes, users have created in my website: To create a table with two columns(latitude, longitude) that both of them are float ...
0
votes
0answers
72 views

php_pdo_pgsql.dll not in php.ini file

I am trying to link a Postgis database to a leaflet map using PHP but all the tutorials say I have to uncomment: ;extension=php_pdo_pgsql.dll in the php.ini file. However this line is nowhere ...
1
vote
0answers
59 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 ...
0
votes
1answer
74 views

TurfJS + PHP + MySQL

I have a PHP endpoint/service that receives Lat/Long data from a 3rd party. The data is then processed in PHP code and saved into a MySQL database. This process works fine without any issues. I need ...
1
vote
0answers
538 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 ...
0
votes
0answers
24 views

How to update php in ms4w

My actual version is 5.3.5, I need the version 7 or >= 5.5.0. I am working on ms4w as my map server and with support postgis to the database on postgres
-1
votes
1answer
129 views

Add coordinates after click into form

I would like to add the coordinates as a click to the map as a form entry, I do not know how the function structure should look like map.on('click', function(e) { var lat = e.latlng.lat; }); <...
1
vote
0answers
382 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"); $...
3
votes
1answer
244 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 ...
0
votes
1answer
149 views

The geometry_type of a spatial column cannot be changed (Requested changing type from “MULTIPOLYGON” to “GEOMETRY” for column “geom” in table X)

Using Symfony 2.8.24, Doctrine 2 and Jsor's doctrine-postgis library, the latter to make Doctrine get along with spatial types like geometry, geography, etc. So, I have a table with a column of type ...
2
votes
1answer
103 views

Open a Spatialite database in PHP

I need to open a Spatialite database by using php in a php's framework. I've already work on a basic php file to test how it work but it gave me some errors. I've already try to load extension by ...
0
votes
0answers
1k 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 ...
0
votes
1answer
158 views

Zoom to centroid of polygon from form-input in Leaflet

I want to write the name of the polygon in a form and then click a button to zoom or to flyto to the centroid of the polygon. I've writen a request in PHP that give the centroid of the polygon. ...
0
votes
0answers
79 views

Increase the number of features returned IN ST_BUFFER MySQL

We are facing a problem. We are getting the same number of the features even if we change the ? d $command = $connection->createCommand("select astext(buffer(geomfromtext('POINT(-15....
-1
votes
1answer
142 views

OSM - Nominatim - ERROR: Scripts must be run from build directory

i'm trying to setup my own nominatim server in a CentOS 7 VirtualMachine. I'm using this guide which is followed here for data import. This line gives me trouble when trying to import data: ./utils/...
2
votes
0answers
99 views

improve the parser on a OSM Data parsing to get the nodes with child [closed]

The following is a little OSM Overpass API example with PHP SimpleXML I've compiled The first part shows how you can query an Overpass Endpoint with standard PHP. For you the second part is more ...
1
vote
1answer
167 views

Return boolean type in PostgreSQL [closed]

I am using ST_Intersects() to know whether two geometries intersect or not. This is my code: $var_name = pg_query($conn,"SELECT ST_Intersects(p1.column_name, p2.column_name) FROM table_name AS p1, ...
0
votes
0answers
255 views

MySQL GeoJSON query for polygons format error

Trying to take MySQL polygons to GeoJSON. My SQL query is Okay and works in PhpMyAdmin and I'm trying to modify some code that works for points. I think I'm close but stuck. In PhpMyAdmin the ...
1
vote
0answers
98 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 ...
0
votes
0answers
340 views

php-cgi not found after installing QGIS Server on Windows

I installed QGIS Server 2.18, apache, QGIS Desktop 2.18 and all their dependencies using OSGeo4w x32 setup wizard on a Windows Server 2008 R2 SP1 x64 virtual server. After the installation I type ...
3
votes
1answer
432 views

How to georeference an image dynamically

I am looking for dynamic approach how to georeference an image of a radar. This is a data that is going to be fetch every hour. Of course I will only need radar data (without base layer and borders) ...
4
votes
0answers
90 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 ...
0
votes
1answer
104 views

Mapbender3 error add new application

I'm a newbie to mapbender and need some help. I installed apache 2.4.27, php 7.1.10, mapbender 3.0.6.3 succesfully and connect to my DB oracle 12g works fine. I used this manual> https://doc....
0
votes
2answers
487 views

Uploading shapefile to GeoServer?

I successfully created workspace in GeoServer using cURL in PHP following the GeoServer REST Guide. But I am having problems when trying to upload Shapefile. I followed the instructions on Uploading ...
2
votes
0answers
190 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 ...
1
vote
1answer
156 views

Plotting coördinates on an image in php

For a personal website I would like to plot coordinates of for example historic events etc. on an existing image. This can be a photograph of an area of which I look up the coordinates of the 4 ...
1
vote
0answers
281 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 ...
0
votes
0answers
181 views

Mapbender3 Fatal Error

I'm trying to get Mapbender3 to work with Apache2.4 and PHP5.6. I have Apache and PHP talking to each other and installed correctly. I have followed the instruction to install Mapbender3 found here: ...
0
votes
1answer
843 views

How to make auto zoom when GeoJSON file is added on Leaflet map

I want it to auto zoom / zoom to center when any GeoJSON file is loaded on a Leaflet map. Help please. $.getJSON("{{asset("storage/upload/shapefiles/districts/atd_district_level.geojson")}}",function(...
1
vote
1answer
241 views

Calling Python ogr2ogr from PHP doesn't work as expected?

I have a HTML page that takes and uploaded zip file and then calls a PHP page as a form action. That PHP then calls two Python scripts in my Apache cgi-bin. The first Python script runs with no issue ...
1
vote
1answer
306 views

change PHP to generate dynamic SQL

I'm catching features from my PostGIS database with PHP, which generates dynamic sql requests. Since I can't manage to wrap my response into an ol.layer.Image I thought about using ST_UNION or ...
2
votes
0answers
370 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 ...
1
vote
0answers
39 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/...
0
votes
0answers
1k views

A store locator with multiple categories using google api,php and mysql

I have created a store locator using google api, php and mysql, it is working fine. Now I am creating a select option for selecting the store categories and trying to display the stores which fall in ...
0
votes
0answers
45 views

ArcPy Script returns empty error messages

I'm attempting to run an arcpy script from PHP, but it fails every time, giving me no error messages. The only message displayed is: Failed at Fri Apr 21 13:25:50 2017 (Elapsed Time: 0.00 seconds) ...
0
votes
1answer
135 views

Lizmap editor won't save edits to pgsql

So I have successfully installed Lizmap, Qgis-server, Apache, and a BigSQL postgreSQL database and published a map with a working WFS pointed at a PostGIS enabled table in my database. When I try to ...
1
vote
0answers
73 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
1answer
2k views

To enable SQLite Extension (Spatialite), in PHP launched form command line

I've this PHP code (on Ubuntu 15.10) to test Spatialite in a file named testSpatialite.php ... <html> <head> <title>Testing SpatiaLite on PHP</title> </head> <body&...
1
vote
1answer
477 views

Spatialite: 'no such function: GeomFromText' error

I've this PHP code on my Ubuntu 15.10 virtual machine <?php $lon = 4.221542; $lat = 32.21115; $db_data_sessions = new SQLite3('./DataBase/MyDB.sqlite'); # Loading SpatiaLite as an ...
2
votes
0answers
80 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 ...
1
vote
0answers
100 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
184 views

Leaflet: from postgre via PHP to geojson to website [closed]

I'm still looking for a best way to lunch pgrouting extension on my website as a rookie .Can anybody tell me is it possible? I have OSM data into postrgesql and want to do some routing machine. I want ...