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
0answers
19 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
-3
votes
0answers
15 views

condition that displays two div different with leaflet [on hold]

I wanted to create a condition that displays each time according to different div click on the data on the map
1
vote
0answers
11 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", ...
1
vote
1answer
231 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
2answers
518 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 ...
-1
votes
0answers
42 views

How to update polylines coordinates in postgis after editing the polylines in Leaflet

I have a leaflet map in wich I can draw polylines and edit them. Each time I’m creating a new polyline, I send my coordinates to postgis using a php script. When editing my polyline layer, I would ...
1
vote
1answer
30 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
58 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
53 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
30 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 ...
1
vote
2answers
904 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 ...
5
votes
1answer
3k 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. ...
0
votes
0answers
10 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
27k 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
192 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
74 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
195 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
169 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
41 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
26 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
32 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
135 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
43 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
763 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 ...
2
votes
2answers
178 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 ...
1
vote
2answers
73 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
822 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
285 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
54 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
58 views
2
votes
2answers
813 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
70 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
50 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
312 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
123 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
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
21 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
69 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
76 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
18 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
29 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
425 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
43 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
383 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?
0
votes
0answers
71 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
84 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
20 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
437 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 ...