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

0
votes
2answers
243 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 ...
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 ...
3
votes
1answer
37 views
0
votes
2answers
481 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 ...
2
votes
2answers
726 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
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, ...
4
votes
5answers
748 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 ...
2
votes
1answer
77 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 ...
0
votes
1answer
240 views

How to creat a feature type using rest/ php on geoserver?

I'm trying to create a feature type for a ship in geoserver but when I post the request to the server I get this response: [geoserver.rest] - Trying to create new feature type inside the store, but ...
2
votes
1answer
48 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 ...
5
votes
2answers
1k views

Large loads geojson from mysql to leaflet?

I have a mysql database with +25K rows including geometry and other attributes. Using a mysql2geojson php script I then added it to a leaflet map. It is super slow now, what can I do to boost the ...
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
51 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 ...
0
votes
1answer
38 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 ...
-1
votes
0answers
2k views

How to develop a PHP GIS Applicationfor land parcel search? [duplicate]

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 ...
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
492 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 ...
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 ...
1
vote
2answers
290 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
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
1answer
337 views

Is there any library for converting projection transformation in php?

I would like to transform data from lat/long ETRS89 to y/x UTM ETRS89 through php. Any idea?
10
votes
8answers
23k views

How to Geocode 300,000 addresses on the fly?

I have a database which has 300,000 address, which are to be shown on map. I know if I geo-code all the address it will be too expensive for me. So I was wondering if it is possible to geo-code the ...
0
votes
0answers
47 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 ...
2
votes
1answer
1k views

How to fetch polygons from PostGIS into a PHP array?

Currently I fetch polygons from a database table using ST_AsText(). The results are in text format, like this: POLYGON((84 104,212 48,321 122,243 179,275 238,131 240,84 104)) I am not quite sure if ...
1
vote
1answer
201 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 ...
4
votes
0answers
125 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 ?
0
votes
1answer
92 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 } ); ...
0
votes
1answer
286 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: ...
1
vote
2answers
300 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 ...
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
0answers
45 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) ...
1
vote
2answers
546 views

How to transform/convert Coordinate Reference System with Proj4 and php

Basically my question is: Can I combine the functions of proj4 with php in my server? For example, I would like to know if it is possible get data in WGS84 and transform in ETRS89. I need to get ...
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 ...
1
vote
1answer
516 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 ...
2
votes
2answers
824 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 ...
0
votes
1answer
131 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
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
731 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
364 views

How do i integrate Clustering into my Google Map?

How do i integrate clustering for my google map? I have found a few codes but i'm not sure how to combine both so that it won't mess up the whole site. This is my current code: <script ...
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 ...
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.
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 ...
3
votes
2answers
279 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
858 views

Linux Client for OpenGTS server

I've installed an OpenGTS server and successfully linked it with the GPS2OpenGTS_Pro application for android. The buses I'm tracking offer 3G with a wireless AP, however whenever the bus stops, the ...
1
vote
0answers
125 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, ...