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

1
vote
3answers
1k 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 ...
-3
votes
0answers
12 views

How can fix this php google geocoder to set markers

How can fix this php google geocoder to set markers? # <? if(@$_GET['cmd'] == 'latlng') { $result = ''; $search = $_GET["lat"].','.$_GET["lng"]; $search = ...
0
votes
1answer
15 views

get feature id on click

In my database table there are four fields(lat,lon,sensid,value).i am displaying a vector layer(point feature) by retrieving the lat, lon values from database. Now i want to display the value, ...
0
votes
1answer
22 views

vector layer popup data from database

I have added vector layer(features) on the map. when i click on the feature , in the back end it has to take the latlon values and retrieve the data from database(using php) and display the values in ...
0
votes
2answers
531 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 ...
3
votes
1answer
180 views

Shapefile and geocoding to retrieve an area name

I'm very new to GIS and all things geospatial! I have dbf, prj, sbn, sbx, shp and shx files that have been provided to me. The shapefile contains information on parts of the country that have been ...
2
votes
2answers
253 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 file=@/mnt/hgfs/D/cartodb/...
4
votes
2answers
5k views

How do I set the fillcolor of polygons in Leaflet.js dynamically?

I'm using the interactive chloropath example for leaflet.js I figured out how to make each of my polygons add a running tally of values to the bottom of the page after each polygon is clicked. Upon ...
8
votes
2answers
2k views

How to obfuscate data when using Google Maps?

I've been working on a google map (v3 of the api) that is plotting 120 markers or so (or will do shortly) - see http://www.mediwales.com/mapping. If you view the source the map data is for all the see,...
0
votes
0answers
24 views

Mapbox JS get geojson and echo to a div

I have a mysql table with geo data (id, lat, lon, speed, ...). I am using this php to parse to geojson (json.php in my case): <?php header('Content-type: text/plain'); $username = "[user]"; $...
1
vote
1answer
36 views

inserting points in postgis with pdo (php)

I have a problem with sql insert statement using PDO (php, postgis, postgres). I have tried to use different combinations, but none of them work. Here is what I ve got: $latitude= 46.07175; $...
1
vote
1answer
288 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 ...
0
votes
0answers
8 views

Ushahidi installation problem “Unknown Error”

After finishing install Ushahidi version 2.7, i've got this error application/views/header_nav.php [17]: Following by this messages : Non-static method html::escape() should not be called ...
0
votes
0answers
21 views

Inserting markers coordinates into postgis table with one row per marker via php

I have a leaflet map with some markers (coming from a .gpx) and I’m trying to send them in a postgis table with one row per marker. For the moment it works but only for the first marker. Here is how ...
0
votes
0answers
29 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
21 views

I am using an example fracnsites to make a similar map but I don't under stand the ajax code?

I am using an example fracnsites to make a similar map but I don't under stand the ajax code? The example has js code: var map, fields = ["gid", "createdby", "featname", "feattype", "status", "acres"...
1
vote
1answer
42 views

Why can't PHP insert new geometry on PostGIS?

(Copied this question from stackoverflow, since it may have more answers here.) I'm using ogr2ogr to upload a GPX file to PostGIS. When I do it on command line (Ubuntu 14.04), it works fine. ...
2
votes
1answer
123 views

Leaflet: Map tile request, hidden key/secret via proxy

I would like to request a Leaflet tilelayer without exposing my API key and secret. For example, using the UrtheCast API (but would apply to other similar APIs that embed api_key and api_secret in the ...
0
votes
1answer
70 views

HTML form to load points on Google Maps using API?

I am creating a web page with a Google Map embedded in it. I want to create a form to allow a user to type which London tube zone they wish to see and, when submitted, this will map the tube stations ...
0
votes
1answer
40 views

CartoDB - inserting polygons

I am new to using PostGIS and CartoDB, and I am doing some test SQL inserts into both using PHP. I've had no problem with points, but polygons are proving to be a bit tricky - my SQL insert works ...
7
votes
1answer
4k 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,...
0
votes
0answers
17 views

print x/y coordinate within a getmap request in php

I have created a webservice in php, where you can enter a zipcode and housenumber. By pressing submit on the website, the php will build the url with its bounding box based on the input. I echo the ...
11
votes
10answers
29k 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
1answer
226 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
1answer
96 views

Display Geojson data from PHP API (http://localhost/sample.php) on google map

I have PHP API (http://localhost/api.php) that gives data in GeoJSON format, how can I show that GeoJSON data on Google map ? Dragging & Dropping GeoJSON data on map is not allowed.
0
votes
1answer
277 views

Display geojson on WMS images in openlayers 3

Here actually am trying to achieve multipolygon on wms layer in openlayers 3. In this i'm calling a php file which is giving the output of geojson format but i don't have any idea where i'm doing . I ...
2
votes
1answer
185 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 ...
0
votes
1answer
72 views

Plotting lat long on World Map [closed]

I have lat long coordinates of various merchant ships of the world, say 50000. And I have around 100 instances of coordinates (lat long) of each of these ships at various timestamps. I have them on ...
1
vote
0answers
28 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 ...
0
votes
0answers
42 views

Get the published shape file to client side processed with PHP

I want to use a PHP to retrieve information from the .db file of a shapefile saved as a layer in Geoserver. I need to retrieve attribute data from the layer and present it at the client side. ...
0
votes
1answer
269 views

Zoom to polygon bounds on click. Leaflet ´, GeoJSON

I have a leaflet map with a lot of polygons (borders). I will 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 ...
0
votes
0answers
58 views

how to stop the marker from dragging?

I'm making a form that reads data from a map and puts it in an input field to be inserted into a database. The latitude and longitude were taken perfectly and inserted as expected but my problem is ...
0
votes
1answer
808 views

Transfer Data from Database to Leaflet POP UP

How do you show data from database to leaflet pop up? Here is my code in php select command <?php $db = new PDO('mysql:host=localhost;dbname=poi', 'root', ''); $sql = "SELECT name,user_date,...
1
vote
2answers
102 views

Reduce query time when using both MySQL and PostgreSQL with PostGIS

I am doing a tracking query. The device is sending its location data, timestamp to store in MySQL Database. I want to show the query result of every point with its nearest POI. The POI database is ...
5
votes
5answers
855 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 ...
0
votes
2answers
287 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
72 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
68 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
2answers
856 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
75 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
54 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
1answer
324 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
168 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 https://faimsproject.atlassian.net/wiki/display/FAIMS/...
5
votes
2answers
2k 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
22 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
75 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
88 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
19 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
36 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 ...