Thursday, March 17, 2016

svn setup

1. install TortoiseSVN-1.8.7.25475-x64-svn-1.8.9

2.   at C:\ create a new foler SVN

       right click SVN folder, choose TortoiseSVN -- repo-browser

       URL input :  https://srv33.citycm.local/svn

        On left side panel, can see intranet1, intranet2



           export intranet1 and 2 as needed.



3.

GIS has 2 repo, you can test it and try it.













Wednesday, March 9, 2016

数据处理 processing data

1) zoning, classification:

zoning code 标题和内容,都不能有特殊字符,比如 括号(),/,都不行,空格也不行。
 但是, 连字符 - 和 _ 下划线是可以的

小数点也不行,比如 RM4.5  要改成45 或者4_5


zoning code 后面的描述,description 是可以有其它字符的


2) tabular data

excel, 标题,必须无空格,无特殊字符


================================================

shape file 处理程序,

1.   去掉没有用的field, data management > field > delete field

   tilemill 不能处理简化的时候, 没有另外保存的自身文件.
就是说哦,简化的时候,一定要另存为一个新文件, 否则,tilemill会出错.



简化是最后一步做, 之前要把zoning,做完,因为zoning很可能要该其中的内容.



1.2  有很多address的apartment, unit 是用重复的点的,parcel也是,


     这就要用 qgis, top menu - MMQGIS - modify - delete duplicate geometry 来把重复的点或parcel删除。


2.  qgis > vector > geometry  tool > simplify geometry 简化vertice,

       simplify tolerance :  2
simplify如果参数 为1 或 2 的时候simplify 出错,那就用default 参数 0.0001
1和2 减少的点数多, 0.0001减少的点数少.



     2.1  大城市downtown,有很多楼的地址点是重复的,因为每一个unit,就成为一个点,
           一个楼可能有60个unit,60个 点,这时候,就要把重复的点去掉,三番的zoning也有很     多重复的polygon,
           所以要去掉重复的geometry,
                qgis 》 mmqgis(plugin)》 modify > delete duplicate geomerty















3. GDAL OGR2GUI64.exe  把 shape file 转化成 geojson ,   projection:  "4236"

4. 处理geojson, 1去头,2去尾,3把每行的逗号去掉。

5. import to mongo.



==========================================================

city limit boundary line 处理 leaflet 版,
其它和下面的google map 版一样, 只有替换replace 部分不一样.


1   first remove all up to coordinate:

[ -81.255314684920464, 28.495430541470494 ], [ -81.244196080156513, 28.495468818460033 ],......




2.  replace ], [      >         ], \n [     注意 \n

3.  replace ,    >    ,+好多空格  ],     >     ],+好多空格

4. press alt + shift select all longitude column, cut  and paste after latitude

5, 去掉所有 逗号, 再在经度前加逗号,  最后大括号外面加逗号

6, 还要修理头尾,的几个括号

===================================================

city limit boundary line 处理 google map

1. 如果没有提供city limit,就用fire district, neighbourhood, community 等
进行 dissolve (FID) field.  check "create multipart"

               arcToolbox - data management tool - Generalization - Dissolve
               In the 'dissolved field optional '   check the FID



2. 不要这样做 因为没效率【multipart polygon进行edit vertice, 用delete vertice tool, 选中中间那些小空洞的点,删除,一选中就自动删除,只留一个外面的大polygon的边线,中间的所有点都删除。】

       另外一种办法是,用qgis, top menu - vector - geometry tool - polygon to line

变成line以后,就发现有多条line,但只有一条主要的轮廓,其它那些虽小的line都应该删除。
先选中那条主要的轮廓,然后再反选,即把主要的轮廓以外的细小的线选中。一次性删除。


3. 最后把剩下的一根外轮廓线,进行 simplify geometry ( qgis - vector -gemotry tool - simplify geometry)
    simplify如果参数 为1 或 2 的时候simplify 出错,那就用default 参数 0.0001


4. 把其变成geojson, 最后变成lat long format, 参考

4.1   first remove all up to coordinate: [[]]


4.2    3 steps: replace

[
{ lng:


]
}

, 3
, lat: 3


4.3   每一行前后处理
each line begin with:  [{
each line end should be:  } ],
last line end no comma,  should be :  }] only.


4.4 最后把这些放进js 文件里就可以了。



=============================================