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

3
votes
1answer
37 views

Geojson in postgis Geometry : Z dimension error

i had this php code : ...
1
vote
3answers
56 views

QGIS export feature coordinates

I have a big project (whole country) and it contains smaller features (administrative units). My project is in .shp. How to export features' coordinates one by one or all at once as long as all ...
0
votes
0answers
25 views

GDAL memory raster + OpenLayers

I'm trying to improve my use of GDAL for creating and sending images to an OpenLayers map, but I have some memory issues. Here is the thing : 1. JS send a query to server with map parameters (bbox, ...
0
votes
0answers
32 views

populating a geojson from postgresql with php depending on zoom level

i am about to load a few thousand polygons (a grid 500x500m) from a postgresql db into a leaflet map with php script converting the data into a geojson. the php script populates the geojson depending ...
2
votes
1answer
75 views

Using PHP's curl to Upload *.csv file into CartoDB?

I use CartoDB import api to upload csv file correctly, and I can see the 'pointtest' table is created in the cartoDB website. By following command line: #curl -v -F ...
2
votes
1answer
18 views

Is there an app/plugin combination that suits the tracking of a public bus

In a town near where I live there is a public bus that runs a circuit about once an hour. I was asked if it would be easy to track the bus (presumably via an android device on the bus) and put the ...
1
vote
1answer
50 views

PostGIS table structure question

I have been using QGIS to insert point data accompanied by information for each point into PostGIS. When I open PGAdmin to take a look at the table rows I noticed a column near the start of each row ...
2
votes
1answer
46 views

Spatialite not loaded in PHP5 on Ubuntu

I'm trying to install Spatialite (4.3.0a) on Ubuntu (14.94.2 LTS) ..... I'd like to use it with PHP (5.5.9-1) .... Following this post ...
1
vote
0answers
14 views

Prepared statements and MULTILINE geographies [closed]

I'm working on a web application that parses GPX files and enters the contents into a database as Geography objects. Seeing how incoming files can be potentially insecure, I was hoping to use prepared ...
0
votes
1answer
37 views

How configure Spatialite for PHP Version 5.6.14 (on Windows 7 and Apache 2.4)?

I'm on Windows 7, using PHP Version 5.6.14 on Apache 2.4 and I'm trying to access to a Spatialite database. All works fine when execute "no spatial" SQL query in my PHP procedure but when I try to ...
0
votes
1answer
16 views

Generating wms from postgresql table with GeoServer in phpfile?

I've a postgresql table build from shapefile. In my phpfile I duplicate this table with a new name. Now I want to generate a wms with the content of the new table. The generation must be ...
0
votes
0answers
19 views

Querying geom from MS SQL 2014 in PHP/PDO returns empty array

I'm using the following php code: $query = $dbconn->prepare("SELECT [geom].ToString() as geom FROM [the_table_im_using]"); $query->execute(); if($query->errorCode() != 0) { die("Query ...
0
votes
0answers
46 views

PHP, PostGIS & Geojson

I'm using Lumen to connect to postgis and I want to execute this query: WITH query AS (SELECT ST_GeomFromGeoJSON('{"type": "Polygon","coordinates": [[[366063.228612569917459, ...
1
vote
1answer
49 views

If bounds contain a polygon PHP-Leaflet

I have the latitude and the longitude of view of map ( latitude and longitude of north west and the latitude and longitude of southeast ) and a geojson files with MultiPolygon. (43mo) In PHP i want ...
1
vote
0answers
19 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 ...
1
vote
1answer
193 views

Nominatim reverse geocode gets blocked - how do i send a valid UserAgent or Referer?

I have a php page that requests reverse geocoding data from Nominatim OSM server. It was working for over a year. Recently started blocking my requests with the following message: You have been ...
0
votes
1answer
89 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 } ); ...
1
vote
2answers
283 views

Convert WKT to GeoJSON with leaflet

I have a point type WKT geometry column in a MySQL table storing the location of some stores. I want to display it on a leaflet map on my website. I've found plenty of tutorials to doing this on ...
0
votes
0answers
14 views

Calculate Sector & Find Point Inside with PHP

I've been trying to find out how to do this kind of stuff with PHP and haven't had much luck so I thought I'd ask here. My scenario is this. I have a lat/lng point and need to be able to calculate ...
0
votes
0answers
44 views

Creating Tile server without using any Base Map

I have a database of points with coordinates on server (MySQL + PHP). I need to create a transparent (without an image of map) tiles with the points (one tile can be several points) format (x) (y) ...
0
votes
0answers
51 views

Save JSON from Openlayers using AJAX

I am trying to build a web app where users can use OpenLayers to draw features and then save them either as a download or write to a file on the server which I can collect when I need it. I am happy ...
2
votes
1answer
26 views

Error when passing shapefile to postgis through submit button and php

I have the following issue when I try to pass a shape file to postgis. When I run this part of code through the terminal: shp2pgsql -s 2100 -d ...
0
votes
1answer
129 views

Converting EPSG:28992 to universal (Google Maps) lat/lon

I'm trying to find a way to convert EPSG:28992 to Google Maps' lat/lon using PHP. Is this possible? I'm trying to convert XYZ: 137634.397 455715.439 0.0. I'm using Kadaster, which is a Dutch ...
2
votes
2answers
794 views

Take data (points) from MySQL to Leaflet Map using PHP and Ajax

I have records with lat and lngs in a MySQL database and I want to add them to a Leaflet map as markers. I have tried a couple of methods but none seem to work. When the webpage opens the map doesn't ...
2
votes
1answer
65 views

Deploying Web AppBuilder Application with php

I have created my web application with the Web AppBuilder Developer edition, downloaded the zip file and customized the index.html file in my localhost environment. Everything works fine until I ...
3
votes
1answer
716 views

Submit form information from a leaflet popup to MySQL table

I have a leaflet map and I want to have the user fill out a form in a leaflet popup and upon clicking the 'submit' button - the information in the form will be inserted into my MySQL database. As a ...
1
vote
1answer
98 views

I am using “Hindi and Gujrati” font then I am getting “Black Squre Dots”?

At the time of generating PDF file when I am using “Hindi and Gujrati” font then I am getting “Black Squre Dots”. Below I am using code. Here I am trying to convert in UTF-8 but it’s not converting. ...
0
votes
1answer
484 views

How to get 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 ...
2
votes
0answers
15 views

Vanilla PHP and GeoTIFF: How to know byte address and byte length of a “strip” in an LZW-compressed GeoTiff?

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
1answer
36 views

Using php to edit CartoDB infowindow?

Perhaps a basic question, but can php code be used in editing the CartoDB infowindow HTML? We want to show or hide a category depending on the value.
3
votes
2answers
277 views

Column 'SHAPE' cannot be null in mysql database even if the query string is correct

I am trying to write an POLYGON into an column named SHAPE which is a geometry type. And created query which looks $sql = "INSERT INTO rokka(zone,district,location,area,SHAPE) VALUES ...
1
vote
1answer
53 views

Serve very basic WMS data to a GIS system from my PHP server

Apologies for the basic nature of this question - I hadn't heard of GIS until this morning! I have a PHP server with some basic data for geographic points in a MySQL database - each one has a ...
0
votes
0answers
38 views

php array of s2 map indexes to quadtree array

i have a list of s2map cells (at various levels) that i wish to convert to a quadtree for easy-er processing as shown here in binary ...
0
votes
0answers
98 views

Fatal error</b>: Class 'Geocoder\HttpAdapter\CurlHttpAdapter' not found

I have installed Geocoder following the instructions here: https://github.com/geocoder-php/Geocoder And then I try to run this example: require __DIR__.'/vendor/autoload.php'; $bingApikey = ...
0
votes
1answer
137 views

covert a shape file to geojson

Is there any method in PHP to covert a Shapefile to GeoJson ? I need to upload Shapefile and convert it to PostgreSQL table. I tried PHP exec(), but it didn't work. Please help me
0
votes
0answers
81 views

Configuring Select Tool in Postgis Layer of Geomoose

I'm a beginner in this field and i've plotted the postgis database table points in geomoose in 3857 projection.Configured identify tool and it works .But the search query for postgis layer is not ...
0
votes
1answer
283 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: ...
0
votes
0answers
38 views

Determining intersection between list of points and list of linestrings?

I'm coding in php. I have a list of point coordinates (very large one) and a list of linestring geometries (large too). I'd like to determine for each linestring, the point coordinates that ...
1
vote
0answers
233 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 ...
0
votes
0answers
74 views

Street maps with php and mysql

I am trying to create a website that can show how much the houses in the area are worth. I am able to get gis data, but not exactly sure what to do with it or what exactly is needed. I am extremely ...
0
votes
0answers
130 views

finding circumcenter of circle assuming 3 geo points on circumference (lat/long)

Situation: I have 3 geo points (lat/long). I have to draw a circle on a map where these 3 points are "sitting" on a circle circumference (max-distance from point to point = 500 Meters). So I need to ...
0
votes
1answer
726 views

Passing data into leaflet js via a php script

I'm trying to display route data on a map using leaflet. I'm pulling the data from a MYSQL database with a php script. which is working. The data is stored in an array called vechiclelatlong. I use ...
0
votes
0answers
57 views

problem with to addlister event google maps in same html file

I try to make two actionlistener one when the mouse over a marker show a infowindows and the other is for get when click on a market the lat and long and make an AJAX request the two lister code is ...
0
votes
0answers
79 views

Make PostGIS points from Ajax data in a php file

I have an AJAX a string which has lat-long parameters in a request. I try to make point in an SQL query but I get this error 37.15452626 ERROR; parse error- invalid geometry HINT: ...
1
vote
2answers
287 views

Load a shape file in postgresql DB 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 ...
0
votes
0answers
68 views

Modifications to use multiple mapbooks in Geomoose

Currently i'm working on two projects and i want to use two mapbooks.I want to load two mapbooks at the same time without changing the whole geomoose2 folder.I've done the steps shown in ...
0
votes
0answers
111 views

Post coordinates to Php

I am trying to send (x,y) coordinates from script html code to PHP but it doesn't work: -Script code: searchControl.on("results", function (data) { results.clearLayers(); for ...
1
vote
1answer
216 views

Google Maps Javascript and PHP

I try to make a menu bar with icons which show the same icons in the map when clicked, for example hotels or bars. I made a form with radio buttons for choose and click submit. This goes to PHP, ...
0
votes
1answer
151 views

Displaying postgis database data

I'm a beginner in this field and tried to display the postgis database data in localhost.But i used select query in my code .so the table got displayed.I want to display the geographical points in a ...
1
vote
1answer
515 views

Fetching postgis data through php json and passing to leaflet map

I am new to this and trying to explore leaflet and geojson a bit. Please help me with this. This is my php page which I am using to fetch data from PostGIS. (the data opened successfully in the ...