(...) the sql file:
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.6
-- Dumped by pg_dump version 9.6.6
-- Started on 2018-01-25 16:01:20
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- TOC entry 213 (class 1259 OID 28824)
-- Name: arqueologia; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE arqueologia (
gid integer NOT NULL,
kml_style character varying(254),
kml_folder character varying(254),
geom geometry(Point)
);
ALTER TABLE arqueologia OWNER TO postgres;
--
-- TOC entry 212 (class 1259 OID 28822)
-- Name: arqueologia_gid_seq; Type: SEQUENCE; Schema: public; Owner:
postgres
--
CREATE SEQUENCE arqueologia_gid_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE arqueologia_gid_seq OWNER TO postgres;
--
-- TOC entry 3546 (class 0 OID 0)
-- Dependencies: 212
-- Name: arqueologia_gid_seq; Type: SEQUENCE OWNED BY; Schema: public;
Owner: postgres
--
ALTER SEQUENCE arqueologia_gid_seq OWNED BY arqueologia.gid;
--
-- TOC entry 3412 (class 2604 OID 28827)
-- Name: arqueologia gid; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY arqueologia ALTER COLUMN gid SET DEFAULT
nextval('arqueologia_gid_seq'::regclass);
--
-- TOC entry 3541 (class 0 OID 28824)
-- Dependencies: 213
-- Data for Name: arqueologia; Type: TABLE DATA; Schema: public; Owner:
postgres
--
COPY arqueologia (gid, kml_style, kml_folder, geom) FROM stdin;
1 msn_I3 Arcos de Valdevez 0101000000DB34B6D782E620C04FADBEBA2AF84440
2 msn_M Arcos de Valdevez 01010000006F1118EB1BB020C0EA5E27F565EF4440
3 msn_M Arcos de Valdevez 0101000000FC8F4C874EC720C07C478D0931EF4440
4 msn_I1 Caminha 0101000000E62494BE10AA21C020240B98C0EF4440
5 msn_M0 Caminha 01010000004640852348AD21C0346953758FE64440
6 msn_M0 Caminha 0101000000637E6E68CAAE21C03C16DBA4A2E74440
7 msn_M0 Caminha 0101000000A5A0DB4B1A9321C09415C3D501F44440
8 msn_M0 Caminha 0101000000A7AFE76B96B321C031ED9BFBABE74440
9 msn_V1 Melgaço 010100000051BD35B0553220C0B3EA73B515094540
10 msn_M1 Melgaço 0101000000DFDE35E84B8F20C02C0C91D3D70B4540
11 msn_M1 Monção 010100000004745FCE6CE720C06231EA5A7B034540
12 msn_V0 Ponte da Barca 0101000000A41CCC26C08020C0DCF0BBE996EB4440
13 msn_I2 Paredes de Coura 01010000003145B9347E4121C0643A747ADEEF4440
14 msn_C Ponte de Lima 0101000000C3B986191A1F21C08F352383DCE54440
15 msn_I Ponte de Lima 0101000000726C3D43383621C0BD512B4CDFE34440
16 msn_I Ponte de Lima 01010000007B134372323921C07023658BA4DB4440
17 msn_I Ponte de Lima 01010000009C69C2F6933921C017B7D100DED84440
18 msn_I Ponte de Lima 010100000054E23AC6153721C0F7EAE3A1EFD84440
19 msn_I Ponte de Lima 01010000000667F0F78B4921C07FDC7EF964E54440
20 msn_V Valença 010100000026E2ADF36F4721C0F450DB8651004540
21 msn_I0 Valença 01010000007632384A5E2D21C0B988EFC4ACFF4440
22 msn_E Vila Nova de Cerveira 0101000000A60A4625757A21C09D9CA1B8E3F94440
23 msn_I2 Vila Nova de Cerveira 01010000000B43E4F4F56421C0D7BE805EB8F14440
\.
--
-- TOC entry 3547 (class 0 OID 0)
-- Dependencies: 212
-- Name: arqueologia_gid_seq; Type: SEQUENCE SET; Schema: public; Owner:
postgres
--
SELECT pg_catalog.setval('arqueologia_gid_seq', 23, true);
--
-- TOC entry 3415 (class 2606 OID 28832)
-- Name: arqueologia arqueologia_pkey; Type: CONSTRAINT; Schema: public;
Owner: postgres
--
ALTER TABLE ONLY arqueologia
ADD CONSTRAINT arqueologia_pkey PRIMARY KEY (gid);
--
-- TOC entry 3413 (class 1259 OID 28833)
-- Name: arqueologia_geom_idx; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX arqueologia_geom_idx ON arqueologia USING gist (geom);
-- Completed on 2018-01-25 16:01:21
--
-- PostgreSQL database dump complete
--
segunda-feira, 29 de Janeiro de 2018 às 17:22:52 UTC, Adam Cox escreveu:
>
> Hi David, you're correct that this is a JSON syntax error. I used this
> handy tool https://jsonlint.com/ to test it. It also formats the code in
> a way that makes it easier to visualize JSON syntax.
>
> Ultimately, the change that needs to happen is moving the ] that is near
> the very end to a position right before the "config" section and adding a ,
> after it. So the following is valid JSON:
>
> {
> "type": "FeatureCollection",
> "features": [{
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_I3",
> "KML_FOLDER": "Arcos de Valdevez"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.450217, 41.938804]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_M",
> "KML_FOLDER": "Arcos de Valdevez"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.343963, 41.870299]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_M",
> "KML_FOLDER": "Arcos de Valdevez"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.389271, 41.868684]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_I1",
> "KML_FOLDER": "Caminha"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.832159, 41.873065]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_M0",
> "KML_FOLDER": "Caminha"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.838441, 41.801253]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_M0",
> "KML_FOLDER": "Caminha"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.841388, 41.809651]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_M0",
> "KML_FOLDER": "Caminha"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.787310, 41.906306]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_M0",
> "KML_FOLDER": "Caminha"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.850757, 41.809936]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_V1",
> "KML_FOLDER": "Melgaço"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.098310, 42.070975]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_M1",
> "KML_FOLDER": "Melgaço"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.279876, 42.092524]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_M1",
> "KML_FOLDER": "Monção"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.452002, 42.027202]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_V0",
> "KML_FOLDER": "Ponte da Barca"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.251466, 41.840543]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_I2",
> "KML_FOLDER": "Paredes de Coura"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.627916, 41.873977]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_C",
> "KML_FOLDER": "Ponte de Lima"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.560746, 41.795792]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_I",
> "KML_FOLDER": "Ponte de Lima"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.605898, 41.780252]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_I",
> "KML_FOLDER": "Ponte de Lima"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.611713, 41.715959]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_I",
> "KML_FOLDER": "Ponte de Lima"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.612457, 41.694275]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_I",
> "KML_FOLDER": "Ponte de Lima"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.607588, 41.694813]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_I",
> "KML_FOLDER": "Ponte de Lima"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.643646, 41.792144]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_V",
> "KML_FOLDER": "Valença"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.639526, 42.002488]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_I0",
> "KML_FOLDER": "Valença"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.588610, 41.997460]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_E",
> "KML_FOLDER": "Vila Nova de Cerveira"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.739175, 41.952262]
> }
> },
> {
> "type": "Feature",
> "properties": {
> "KML_STYLE": "msn_I2",
> "KML_FOLDER": "Vila Nova de Cerveira"
> },
> "geometry": {
> "type": "Point",
> "coordinates": [-8.697189, 41.888439]
> }
> }
> ],
> "config": {
> "provider": {
> "class": "TileStache.Goodies.VecTiles:Provider",
> "kwargs": {
> "dbinfo": {
> "host": "localhost",
> "user": "postgres",
> "password": "XXXXXXX",
> "database": "arches",
> "port": "5432"
> },
> "simplify": 0.5,
> "queries": [
> "select gid as __id__, name, st_asgeojson(geom) as geojson,
> st_transform(geom, 900913) as __geometry__ from arqueologia"
> ]
> }
> },
> "allowed origin": "*",
> "compress": true,
> "write cache": false
> }
> }
>
> However, I'm unsure what the purpose of the "features" section... Are
> those additional points that you would like to show in addition to the
> contents of arqueologia? If so, I think you'll need to accomplish that in
> a different way. As described in the docs (which, apologies, but that
> section has move here:
> http://arches4.readthedocs.io/en/stable/creating-new-map-layers/ with the
> recent 4.1 release) there should only be three main sections of of the JSON
> contents:
>
> {
> "type" : ## This value should be "raster" or "vector".
> "layers" : ## This is a mapbox.js layer definition which defines the style
> ## of the layer and links the source name with the layer name.
> "config" : ## This is the tileserver configuration that will be used by
> ## TileStache. Refer to TileStache docs and place the entire
> ## "provider" section into this "config" section.}
>
> In your case, I believe it would look like this:
>
> {
> "type": "vector",
> "layers": [{
> "id": "arqueologia",
> "type": "line",
> "source": "arqueologia",
> "source-layer": "arqueologia",
> "layout": {
> "visibility": "visible"
> },
> "paint": {
> "line-width": 2,
> "line-color": "rgb(37, 58, 241)"
> }
> }],
> "config": {
> "provider": {
> "class": "TileStache.Goodies.VecTiles:Provider",
> "kwargs": {
> "dbinfo": {
> "host": "localhost",
> "user": "postgres",
> "password": "XXXXXX",
> "database": "arches",
> "port": "5432"
> },
> "simplify": 0.5,
> "queries": [ "select gid as __id__, name,
> st_asgeojson(geom) as geojson, st_transform(geom, 900913) as __geometry__
> from arqueologia"
> ]
> }
> },
> "allowed origin": "*",
> "compress": true,
> "write cache": false
> }}
>
> I've been trying this out with a local postgis table of my own (not
> rivers) and have some more notes from the experience:
>
> - To be on the safe side, I put the name of my postgis table in the id
> , source, and source-layer properties of the first entry of the layers
> section.
> I think a couple of these properties get overwritten on load and therefore
> are not necessary, but I just wanted to follow the rivers example.
> - Inside the layer definition, type and paint must be coordinated
> well. For type, the options are fill, line, symbol, circle,
> fill-extrusion, raster, or background. In my case, I was trying out a
> polygon layer, so I needed fill. For points, I'm assuming symbol or circle
> would work..
> - Once the layer type is set, then you have to use to correct paint
> properties to fit that type. This is where the Mapbox GL JS style spec is
> necessary, https://www.mapbox.com/mapbox-gl-js/style-spec/. If you are
> styling a symbol layer, then you are only able to use the paint properties
> listed here
> https://www.mapbox.com/mapbox-gl-js/style-spec/#layers-symbol. Once
> the layer is loaded however, you can further edit its style in the Layer
> Manager (use the Service Styling tab).
> - In the queries section, note that there a 3 different column names
> in the example, and the column names in your own table may be different.
> In
> my case geom and name did indeed exist, however I needed to change gid to
> id.
>
> Hope that helps you out a bit!
>
> Adam
>
>
>
> On Mon, Jan 29, 2018 at 8:04 AM, David Lopes <[email protected]
> <javascript:>> wrote:
>
>> Hi Adam,
>>
>> It's me again regarding the same subject.
>>
>> I've already successfully loaded the sql files to the database (arches)
>> and executed the python commad for the json files but I get the following
>> error message:
>>
>>
>> operation: add_tileserver_layer
>> package: arches
>> Traceback (most recent call last):
>> File "manage.py", line 27, in <module>
>> execute_from_command_line(sys.argv)
>> File
>> "/home/ubuntu/Projects/ENV/local/lib/python2.7/site-packages/django/core/
>> management/__init__.py", line 364, in
>> execute_from_command_line
>> utility.execute()
>> File
>> "/home/ubuntu/Projects/ENV/local/lib/python2.7/site-packages/django/core/
>> management/__init__.py", line 356, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>> File
>> "/home/ubuntu/Projects/ENV/local/lib/python2.7/site-packages/django/core/
>> management/base.py", line 283, in run_from_argv
>> self.execute(*args, **cmd_options)
>> File
>> "/home/ubuntu/Projects/ENV/local/lib/python2.7/site-packages/django/core/
>> management/base.py", line 330, in execute
>> output = self.handle(*args, **options)
>> File
>> "/home/ubuntu/Projects/arches/arches/management/commands/packages.py", li
>> ne 188, in handle
>> self.add_tileserver_layer(options['layer_name'],
>> options['mapnik_xml_path'], options['layer_icon'],
>> options['is_basemap'], options['tile_config_path'])
>> File
>> "/home/ubuntu/Projects/arches/arches/management/commands/packages.py", li
>> ne 907, in add_tileserver_layer
>> config_data = json.load(content)
>> File "/usr/lib/python2.7/json/__init__.py", line 291, in load
>> **kw)
>> File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
>> return _default_decoder.decode(s)
>> File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
>> obj, end = self.raw_decode(s, idx=_w(s, 0).end())
>> File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
>> obj, end = self.scan_once(s, idx)
>> ValueError: Expecting , delimiter: line 51 column 2 (char 3923)
>>
>> Since I am almost sure it has something to do with the sintax of the json
>> file (I am not a programmer), I join the file (with no password) in the
>> hope that you can help me:
>>
>> {
>> "type": "FeatureCollection",
>> "features": [
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_I3", "KML_FOLDER":
>> "Arcos de Valdevez" }, "geometry": { "type": "Point", "coordinates": [
>> -8.450217, 41.938804 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_M", "KML_FOLDER":
>> "Arcos de Valdevez" }, "geometry": { "type": "Point", "coordinates": [
>> -8.343963, 41.870299 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_M", "KML_FOLDER":
>> "Arcos de Valdevez" }, "geometry": { "type": "Point", "coordinates": [
>> -8.389271, 41.868684 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_I1", "KML_FOLDER":
>> "Caminha" }, "geometry": { "type": "Point", "coordinates": [ -8.832159,
>> 41.873065 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_M0", "KML_FOLDER":
>> "Caminha" }, "geometry": { "type": "Point", "coordinates": [ -8.838441,
>> 41.801253 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_M0", "KML_FOLDER":
>> "Caminha" }, "geometry": { "type": "Point", "coordinates": [ -8.841388,
>> 41.809651 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_M0", "KML_FOLDER":
>> "Caminha" }, "geometry": { "type": "Point", "coordinates": [ -8.787310,
>> 41.906306 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_M0", "KML_FOLDER":
>> "Caminha" }, "geometry": { "type": "Point", "coordinates": [ -8.850757,
>> 41.809936 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_V1", "KML_FOLDER":
>> "Melgaço" }, "geometry": { "type": "Point", "coordinates": [ -8.098310,
>> 42.070975 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_M1", "KML_FOLDER":
>> "Melgaço" }, "geometry": { "type": "Point", "coordinates": [ -8.279876,
>> 42.092524 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_M1", "KML_FOLDER":
>> "Monção" }, "geometry": { "type": "Point", "coordinates": [ -8.452002,
>> 42.027202 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_V0", "KML_FOLDER":
>> "Ponte da Barca" }, "geometry": { "type": "Point", "coordinates": [
>> -8.251466, 41.840543 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_I2", "KML_FOLDER":
>> "Paredes de Coura" }, "geometry": { "type": "Point", "coordinates": [
>> -8.627916, 41.873977 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_C", "KML_FOLDER":
>> "Ponte de Lima" }, "geometry": { "type": "Point", "coordinates": [
>> -8.560746, 41.795792 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_I", "KML_FOLDER":
>> "Ponte de Lima" }, "geometry": { "type": "Point", "coordinates": [
>> -8.605898, 41.780252 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_I", "KML_FOLDER":
>> "Ponte de Lima" }, "geometry": { "type": "Point", "coordinates": [
>> -8.611713, 41.715959 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_I", "KML_FOLDER":
>> "Ponte de Lima" }, "geometry": { "type": "Point", "coordinates": [
>> -8.612457, 41.694275 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_I", "KML_FOLDER":
>> "Ponte de Lima" }, "geometry": { "type": "Point", "coordinates": [
>> -8.607588, 41.694813 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_I", "KML_FOLDER":
>> "Ponte de Lima" }, "geometry": { "type": "Point", "coordinates": [
>> -8.643646, 41.792144 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_V", "KML_FOLDER":
>> "Valença" }, "geometry": { "type": "Point", "coordinates": [ -8.639526,
>> 42.002488 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_I0", "KML_FOLDER":
>> "Valença" }, "geometry": { "type": "Point", "coordinates": [ -8.588610,
>> 41.997460 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_E", "KML_FOLDER":
>> "Vila Nova de Cerveira" }, "geometry": { "type": "Point", "coordinates": [
>> -8.739175, 41.952262 ] } }
>> ,
>> { "type": "Feature", "properties": { "KML_STYLE": "msn_I2", "KML_FOLDER":
>> "Vila Nova de Cerveira" }, "geometry": { "type": "Point", "coordinates": [
>> -8.697189, 41.888439 ] } }
>>
>>
>> "config": {
>> "provider": {
>> "class": "TileStache.Goodies.VecTiles:Provider",
>> "kwargs": {
>> "dbinfo": {
>> "host": "localhost",
>> "user": "postgres",
>> "password": "XXXXXXX",
>> "database": "arches",
>> "port": "5432"
>> },
>> "simplify": 0.5,
>> "queries": [
>> "select gid as __id__, name, st_asgeojson(geom) as geojson,
>> st_transform(geom, 900913) as __geometry__ from arqueologia"
>> ]
>> }
>> },
>> "allowed origin": "*",
>> "compress": true,
>> "write cache": false
>> }
>>
>>
>>
>> ]
>> }
>>
>>
>> Once again thanks,
>>
>>
>>
>>
>>
>> sexta-feira, 19 de Janeiro de 2018 às 15:18:47 UTC, Adam Cox escreveu:
>>>
>>> Based on the example here
>>> http://arches4.readthedocs.io/en/stable/managing-map-layers/#tileserver-layers,
>>>
>>> you can see that the db info is in the "config" section of the .json file
>>> (if you are making a layer based on a postgis table). It occurs to me now
>>> that you should be wary of sharing config files such as this, as they would
>>> likely contain the credentials to your Arches pg database (unless you are
>>> pulling from another database... either way, you shouldn't share those
>>> credentials...).
>>>
>>> Adam
>>>
>>> On Fri, Jan 19, 2018 at 9:13 AM, David Lopes <[email protected]> wrote:
>>>
>>>> Adam,
>>>>
>>>> One more question: the .json file requires a few lines connecting with
>>>> the database, right?
>>>>
>>>> Best regards.
>>>>
>>>>
>>>>
>>>> quinta-feira, 18 de Janeiro de 2018 às 18:04:17 UTC, Adam Cox escreveu:
>>>>>
>>>>> FYI I just tested loading the sql from that repo example and then
>>>>> loading the tile layer with the config file that's in there, and the
>>>>> layer
>>>>> loaded correctly.
>>>>>
>>>>> On Thu, Jan 18, 2018 at 9:59 AM, Adam Cox <[email protected]> wrote:
>>>>>
>>>>>> Hi David, are you using a config file from the repo, or have you made
>>>>>> a new one? From looking at the error, it seems like the config file you
>>>>>> are
>>>>>> using may have [ ] in the outermost position instead of { }, but the
>>>>>> config
>>>>>> files in that repo do look fine to me.
>>>>>>
>>>>>> Adam
>>>>>>
>>>>>> On Thu, Jan 18, 2018 at 9:13 AM, David Lopes <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I've been trying to add .sql and .json files to the data base
>>>>>>> without success (https://github.com/legiongis/arches4-geo-examples)
>>>>>>>
>>>>>>> I get the following message:
>>>>>>>
>>>>>>> operation: add_tileserver_layer
>>>>>>> package: arches
>>>>>>> Traceback (most recent call last):
>>>>>>> File "manage.py", line 27, in <module>
>>>>>>> execute_from_command_line(sys.argv)
>>>>>>> File
>>>>>>> "/home/ubuntu/Projects/ENV/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>>>>>>
>>>>>>> line 364, in execute_from_command_line
>>>>>>> utility.execute()
>>>>>>> File
>>>>>>> "/home/ubuntu/Projects/ENV/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>>>>>>
>>>>>>> line 356, in execute
>>>>>>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>>>>>> File
>>>>>>> "/home/ubuntu/Projects/ENV/local/lib/python2.7/site-packages/django/core/management/base.py",
>>>>>>>
>>>>>>> line 283, in run_from_argv
>>>>>>> self.execute(*args, **cmd_options)
>>>>>>> File
>>>>>>> "/home/ubuntu/Projects/ENV/local/lib/python2.7/site-packages/django/core/management/base.py",
>>>>>>>
>>>>>>> line 330, in execute
>>>>>>> output = self.handle(*args, **options)
>>>>>>> File
>>>>>>> "/home/ubuntu/Projects/arches/arches/management/commands/packages.py",
>>>>>>> line
>>>>>>> 188, in handle
>>>>>>> self.add_tileserver_layer(options['layer_name'],
>>>>>>> options['mapnik_xml_path'], options['layer_icon'],
>>>>>>> options['is_basemap'],
>>>>>>> options['tile_config_path'])
>>>>>>> File
>>>>>>> "/home/ubuntu/Projects/arches/arches/management/commands/packages.py",
>>>>>>> line
>>>>>>> 908, in add_tileserver_layer
>>>>>>> config = config_data["config"]
>>>>>>> TypeError: list indices must be integers, not str
>>>>>>>
>>>>>>>
>>>>>>> Can you tell what's wrong?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> --
>>>>>>> -- To post, send email to [email protected]. To
>>>>>>> unsubscribe, send email to [email protected]. For
>>>>>>> more information, visit
>>>>>>> https://groups.google.com/d/forum/archesproject?hl=en
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Arches Project" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>> -- To post, send email to [email protected]. To unsubscribe,
>>>> send email to [email protected]. For more information,
>>>> visit https://groups.google.com/d/forum/archesproject?hl=en
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Arches Project" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>> -- To post, send email to [email protected] <javascript:>. To
>> unsubscribe, send email to [email protected] <javascript:>.
>> For more information, visit
>> https://groups.google.com/d/forum/archesproject?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Arches Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
-- To post, send email to [email protected]. To unsubscribe, send
email to [email protected]. For more information,
visit https://groups.google.com/d/forum/archesproject?hl=en
---
You received this message because you are subscribed to the Google Groups
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.