<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>lizongbo at 618119.com &#187; MapInfo</title>
	<atom:link href="http://618119.com/tag/mapinfo/feed" rel="self" type="application/rss+xml" />
	<link>http://618119.com</link>
	<description>工作,生活,java,apache,tomcat,Resin,mina,Hessian,Openfire,XMPP,RPC,Ubuntu</description>
	<lastBuildDate>Sat, 21 Aug 2010 08:34:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>在geoserver和Mapinfo中过滤重复显示的标注</title>
		<link>http://618119.com/archives/2008/01/17/65.html</link>
		<comments>http://618119.com/archives/2008/01/17/65.html#comments</comments>
		<pubDate>Thu, 17 Jan 2008 05:06:02 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[geoserver]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[MapInfo]]></category>
		<category><![CDATA[OpenLayers]]></category>

		<guid isPermaLink="false">http://618119.com/archives/2008/01/17/65.html</guid>
		<description><![CDATA[在geoserver和Mapinfo中过滤重复显示的标注
由于国家地理中心提供的地图的问题，在Mapinfo和geoserver中，都会显示重复的地名，
比如显示出多个“广东省”，“台湾省”。“海南省”。
解决方法如下：
在mapinfo中，
主菜单&#8211;&#62;地图&#8211;&#62;图层控制&#8211;&#62;，选中图层的标注，点“标注”，将“允许文本重复”的钩去掉。
在geoserver中，在为地图定义的style里，加上
&#60;sld:VendorOption name=&#8221;group&#8221;&#62;yes&#60;/sld:VendorOption&#62;
修改后片段如下：
[code]
&#60;sld:TextSymbolizer&#62;
&#60;sld:Label&#62;
&#60;ogc:PropertyName&#62;NAME&#60;/ogc:PropertyName&#62;
&#60;/sld:Label&#62;
&#60;sld:Font&#62;
&#60;sld:CssParameter name="font-size"&#62;
&#60;ogc:Literal&#62;12.0&#60;/ogc:Literal&#62;
&#60;/sld:CssParameter&#62;
&#60;sld:CssParameter name="font-style"&#62;
&#60;ogc:Literal&#62;normal&#60;/ogc:Literal&#62;
&#60;/sld:CssParameter&#62;
&#60;sld:CssParameter name="font-weight"&#62;
&#60;ogc:Literal&#62;normal&#60;/ogc:Literal&#62;
&#60;/sld:CssParameter&#62;
&#60;/sld:Font&#62;
&#60;sld:LabelPlacement&#62;
&#60;sld:PointPlacement&#62;
&#60;sld:AnchorPoint&#62;
&#60;sld:AnchorPointX&#62;
&#60;ogc:Literal&#62;0.5&#60;/ogc:Literal&#62;
&#60;/sld:AnchorPointX&#62;
&#60;sld:AnchorPointY&#62;
&#60;ogc:Literal&#62;0.5&#60;/ogc:Literal&#62;
&#60;/sld:AnchorPointY&#62;
&#60;/sld:AnchorPoint&#62;
&#60;sld:Displacement&#62;
&#60;sld:DisplacementX&#62;
&#60;ogc:Literal&#62;0&#60;/ogc:Literal&#62;
&#60;/sld:DisplacementX&#62;
&#60;sld:DisplacementY&#62;
&#60;ogc:Literal&#62;0&#60;/ogc:Literal&#62;
&#60;/sld:DisplacementY&#62;
&#60;/sld:Displacement&#62;
&#60;sld:Rotation&#62;
&#60;ogc:Literal&#62;0.0&#60;/ogc:Literal&#62;
&#60;/sld:Rotation&#62;
&#60;/sld:PointPlacement&#62;
&#60;/sld:LabelPlacement&#62;
&#60;sld:Fill&#62;
&#60;sld:CssParameter name="fill"&#62;
&#60;ogc:Literal&#62;#000000&#60;/ogc:Literal&#62;
&#60;/sld:CssParameter&#62;
&#60;sld:CssParameter name="fill-opacity"&#62;
&#60;ogc:Literal&#62;1.0&#60;/ogc:Literal&#62;
&#60;/sld:CssParameter&#62;
&#60;/sld:Fill&#62;
&#60;sld:VendorOption name="spaceAround"&#62;2&#60;/sld:VendorOption&#62;
&#60;sld:VendorOption name="group"&#62;yes&#60;/sld:VendorOption&#62;
&#60;/sld:TextSymbolizer&#62;
[/code]
我在google是用 “TextSymbolizer duplicate  label”来找到解决这个问题的帖子的。
参考： http://osdir.com/ml/gis.geoserver.user/2006-12/msg00013.html
http://osdir.com/ml/gis.geoserver.user/2006-12/msg00008.html
http://postgis.refractions.net/pipermail/postgis-users/2007-November/017846.html
sld的 schema文件在：  http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd
本地目录在： \geoserver\schemas\sld\StyledLayerDescriptor.xsd
补记一下，geoserver-1.6.0-RC2-war.zip中自带的OpenLayers.js貌似版本要低些，
在使用LonLat时有出错信息，
例如：             map.setCenter(new OpenLayers.LonLat(114, 22.54), 4);
于是我直接用OpenLayers-2.5.zip 中的OpenLayers替换geoserver\openlayers下面的文件，就不再出错了。

	Tags: geoserver, gis, MapInfo, OpenLayers

	Related posts
	
	省级行政区划代码整理 (1)
	深圳的几个办事地点的位置及相关公交路线 (0)
	整理行政区划数据的几个操作步骤 (0)
	用JavaScript为OpenLayers.Marker的加上单击显示详细信息的功能 (0)
	使用uDig制作geoserver中需要的style (0)


]]></description>
		<wfw:commentRss>http://618119.com/archives/2008/01/17/65.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>获取公开的中国地图信息和使用MapBasic提取MapInfo地图资源信息</title>
		<link>http://618119.com/archives/2008/01/15/64.html</link>
		<comments>http://618119.com/archives/2008/01/15/64.html#comments</comments>
		<pubDate>Tue, 15 Jan 2008 05:15:23 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[geoserver]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[MapBasic]]></category>
		<category><![CDATA[MapInfo]]></category>
		<category><![CDATA[OpenLayers]]></category>
		<category><![CDATA[地图]]></category>

		<guid isPermaLink="false">http://618119.com/archives/2008/01/15/64.html</guid>
		<description><![CDATA[Mapinfo 自带了一份中国地图，有一定量的数据，足够学习使用，
数据文件在 \MAPINFO\DATA\MAP_DATA\ASIA\CHINA
表文件有：
CAP2_ZHE.TAB
CAP4_ZHE.TAB
CAPITALS.TAB
CHCTY_2K.TAB
CHCTY_5K.TAB
CHINA.TAB
CHINAHWY.TAB
CHINCAPS.TAB
CNTY_ZHE.TAB
PREF_ZHE.TAB
PROVINCE.TAB
国家基础地理信息中心也提供了中国地图下载，内容更加详细，只是数据实在太老，也只能仅供学习使用。
国家基础地理信息系统数据下载服务
来源 ：http://nfgis.nsdi.gov.cn/nfgis/chinese/c_xz.htm
国界:bou1_4m.zip
国界与省界:bou2_4m.zip
首都和省级行政中心:res1_4m.zip
地市级以上居民地:res2_4m.zip
一级河流:hyd1_4m.zip
三级以上河流:hyd2_4m.zip
主要公路:roa_4m.zip
主要铁路:rai_4m.zip
地级行政界线:bou3_4m.zip
县级行政界线:bou4_4m.zip
县级居民地:res4_4m.zip
四级河流:hyd4_4m.zip
五级河流:hyd5_4m.zip
ESRI Shape File 格式地图下载地址:
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/hyd5_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/hyd4_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/res4_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/bou4_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/bou3_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/rai_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/hyd2_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/roa_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/hyd1_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/res2_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/res1_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/bou2_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/shp/bou1_4m.zip
mapinfo的 mif格式地图下载地址:
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/hyd5_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/hyd4_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/res4_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/bou4_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/bou3_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/rai_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/hyd2_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/roa_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/hyd1_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/res2_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/res1_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/bou2_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/mif/bou1_4m.zip
ARC/INFO的E00格式地图下载地址:
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/hyd5_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/hyd4_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/res4_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/bou4_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/bou3_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/rai_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/hyd2_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/roa_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/hyd1_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/res2_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/res1_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/bou2_4m.zip
http://nfgis.nsdi.gov.cn/mapdata/nfgis_4m/downloaddata/e00/bou1_4m.zip
mapinfo 中可以用 Centroidx和Centroidy函数来选择区域的中心坐标。
partly within用来表示位于指定区域
针对国家基础地理信息的中国地提，使用下面的Mapbasic提取广东省所有县的中心坐标及行整区划代码，
//提取县，需要先打开，bou2_4p.tab和XianCh.tab，然后鼠标选择广东省这个区域
dim k as object
k=selection.obj
select Centroidx(obj),Centroidy(obj),adcode93,name from xianch where obj partly within k  into seltab
//提取市,需要先打开，bou2_4p.tab和res2_4p.tab，然后鼠标选择广东省这个区域
dim k as object
k=selection.obj
select Centroidx(obj),Centroidy(obj),adcode99,name from res2_4p where obj partly within k  into seltab
国家基础地理信息的数据实在是老得掉牙：
//javascript变量定义
var oldguangdongareainfo=[
110.854,21.9192,440922,"高州县",
110.625,21.654,440924,"化州县",
110.283,21.6132,440822,"廉江县",
111.002,21.5111,440923,"电白县",
110.779,21.4465,440821,"吴川县",
110.251,21.383,440823,"遂溪县",
110.088,20.902,440824,"海康县",
110.163,20.3297,440825,"徐闻县",
110.939,22.3635,440921,"信宜县",
112.378,24.7797,441824,"连县",
112.283,24.7188,441826,"连南瑶族自治县",
112.073,24.5693,441825,"连山壮族瑶族自治县",
112.179,23.9122,441224,"怀集县",
112.431,23.6427,441223,"广宁县",
111.508,23.4451,441225,"封开县",
111.521,23.2422,441229,"郁南县",
111.771,23.1468,441226,"德庆县",
112.453,23.0569,441201,"高要县",
112.04,22.9332,441227,"云浮县",
111.57,22.7669,441230,"罗定县",
112.225,22.7029,441228,"新兴县",
112.307,22.1919,440723,"恩平县",
111.791,22.1759,441722,"阳春县",
111.627,21.7504,441721,"阳西县",
113.038,22.5266,440721,"新会县",
113.347,25.1349,440225,"乐昌县",
113.269,24.7842,440232,"乳源瑶族自治县",
112.638,24.485,441823,"阳山县",
113.402,24.1729,441822,"英德县",
113.531,23.8719,441821,"佛冈县",
113.203,23.3768,440121,"花县",
112.695,23.3487,441222,"四会县",
112.886,23.1659,440621,"三水县",
113.366,22.9438,440126,"番禺县",
112.848,22.889,440624,"高明县",
113.254,22.8479,440623,"顺德县",
112.958,22.7659,440725,"鹤山县",
112.692,22.3754,440724,"开平县",
112.794,22.2514,440722,"台山县",
113.287,22.2124,440421,"斗门县",
113.876,22.5767,440321,"宝安县",
114.302,25.1188,440223,"南雄县",
113.743,25.0901,440224,"仁化县",
114.063,24.9458,440222,"始兴县",
113.596,24.6839,440221,"曲江县",
114.482,24.3577,441623,"连平县",
114.132,24.3445,440229,"翁源县",
114.202,24.0625,440233,"新丰县",
114.243,23.7393,441324,"龙门县",
113.581,23.5554,440122,"从化县",
113.829,23.2926,440125,"增城县",
114.274,23.1722,441322,"博罗县",
114.712,22.9878,441323,"惠东县",
114.463,22.7993,441321,"惠阳县",
114.932,24.4397,441624,"和平县",
115.89,24.5659,441426,"平远县",
116.109,24.3075,441401,"梅县",
115.727,24.1387,441425,"兴宁县",
115.256,24.0997,441622,"龙川县",
115.763,23.9322,441424,"五华县",
116.17,23.7672,441423,"丰顺县",
115.173,23.6431,441621,"紫金县",
115.836,23.4346,440526,"揭西县",
115.651,23.3109,441523,"陆河县",
116.168,23.3002,440527,"普宁县",
115.335,22.9757,441521,"海丰县",
115.641,22.9485,441522,"陆丰县",
116.17,24.6514,441427,"蕉岭县",
116.689,24.3545,441422,"大埔县",
116.637,23.6677,440581,"潮州市",
116.35,23.543,440525,"揭阳县",
116.768,23.4632,440521,"澄海县",
116.594,23.261,440524,"潮阳县",
116.289,23.0391,440528,"惠来县",
117.004,23.6761,440522,"饶平县",
113.021,23.7196,441801,"清远",
113.261,23.1189,440101,"广州",
113.115,23.0349,440601,"佛山",
113.568,22.2726,440401,"珠海",
113.085,22.5912,440701,"江门",
112.451,23.0579,441201,"肇庆",
113.371,22.5269,442001,"中山",
110.399,21.195,440801,"湛江",
110.889,21.6707,440901,"茂名",
113.605,24.8088,440201,"韶关",
111.958,21.8452,441701,"阳江",
113.55,22.2008,820000,"澳门",
115.364,22.7787,441501,"汕尾",
114.392,23.088,441301,"惠州",
114.111,22.5564,440301,"深圳",
114.694,23.7348,441601,"河源",
113.749,23.0485,441901,"东莞",
116.684,23.3627,440501,"汕头",
116.108,24.3145,441401,"梅州"];
下面是从另外一份比较新的广东地图中查询广东省各县市的中心坐标,
mapbasic语句为：
Select Centroidx(obj),Centroidy(obj), AdminCode,AdminName from Dguangdong into Selection
Browse * From Selection
查询结果为：
//javascript变量定义，方便 Openlayers直接使用
//广东省县市坐标与行政区划代码信息
//经纬度，行政区划代码，县市名称
var gdareainfo=[
113.218,25.2289,"440281","乐昌市",
113.78,25.1449,"440224","仁化县",
114.339,25.1839,"440282","南雄市",
112.453,24.9054,"441882","连州市",
114.143,24.8319,"440222","始兴县",
113.174,24.8006,"440232","乳源瑶族自治县",
113.546,24.7746,"440200","韶关市",
115.928,24.6671,"441426","平远县",
112.697,24.447,"441823","阳山县",
112.268,24.6136,"441826","连南瑶族自治县",
116.22,24.6517,"441427","蕉岭县",
112.046,24.5154,"441825","连山壮族瑶族自治县",
116.171,24.3575,"441421","梅县",
115.326,24.3137,"441622","龙川县",
114.982,24.4322,"441624","和平县",
116.626,24.3437,"441422","大埔县",
113.988,24.3988,"440229","翁源县",
115.759,24.2475,"441481","兴宁市",
114.589,24.3425,"441623","连平县",
113.338,24.1964,"441881","英德市",
116.102,24.2744,"441400","梅州市",
112.195,23.9327,"441224","怀集县",
112.962,23.9307,"441827","清新县",
114.16,24.0795,"440233","新丰县",
114.853,23.9629,"441625","东源县",
116.943,23.8531,"445122","饶平县",
116.275,23.9175,"441423","丰顺县",
115.669,23.7808,"441424","五华县",
113.552,23.8888,"441821","佛冈县",
116.759,23.7127,"445121","潮安县",
111.694,23.5962,"441225","封开县",
112.397,23.6702,"441223","广宁县",
114.118,23.6462,"441324","龙门县",
113.669,23.6487,"440184","从化市",
114.652,23.6922,"441600","河源市",
113.131,23.6177,"441800","清远市",
115.062,23.4701,"441621","紫金县",
116.554,23.5765,"445221","揭东县",
116.668,23.6934,"445100","潮州市",
114.271,23.3763,"441322","博罗县",
112.643,23.4495,"441284","四会市",
115.901,23.4851,"445222","揭西县",
116.583,23.3388,"440500","汕头市",
113.744,23.3502,"440183","增城市",
113.217,23.4307,"440114","花都区",
116.37,23.5214,"445200","揭阳市",
112.891,23.108,"440600","佛山市",
117.13,23.3702,"440523","南澳县",
116.042,23.3122,"445281","普宁市",
111.902,23.288,"441226","德庆县",
115.624,23.2917,"441523","陆河县",
112.756,23.1015,"441283","高要市",
113.368,23.2701,"440111","白云区",
111.632,23.0586,"445322","郁南县",
112.592,23.1663,"441200","肇庆市",
113.36,23.1718,"440106","天河区",
115.281,22.9641,"441521","海丰县",
116.271,23.0153,"445224","惠来县",
113.484,23.0953,"440112","黄埔区",
115.853,22.9271,"441581","陆丰市",
113.24,23.1299,"440103","荔湾区",
113.26,23.1294,"440104","越秀区",
113.3,23.1272,"440102","东山区",
113.885,22.898,"441900","东莞市",
111.951,22.8497,"445323","云安县",
112.146,22.9655,"445300","云浮市",
113.227,23.0818,"440107","芳村区",
113.331,23.0788,"440105","海珠区",
113.495,22.7965,"440113","番禺区",
111.47,22.6894,"445381","罗定市",
115.418,22.7619,"441500","汕尾市",
112.763,22.662,"440784","鹤山市",
112.244,22.6087,"445321","新兴县",
113.03,22.4386,"440700","江门市",
113.425,22.4764,"442000","中山市",
111.184,22.4464,"440983","信宜市",
111.722,22.2597,"441781","阳春市",
112.526,22.311,"440783","开平市",
112.266,22.2027,"440785","恩平市",
112.679,21.9944,"440781","台山市",
111.001,22.0079,"440981","高州市",
112.041,21.9699,"441723","阳东县",
110.54,21.8416,"440982","化州市",
111.215,21.6637,"440923","电白县",
112.003,21.7329,"441700","阳江市",
110.13,21.6612,"440881","廉江市",
111.599,21.6869,"441721","阳西县",
110.977,21.5809,"440900","茂名市",
110.781,21.4186,"440883","吴川市",
110.03,21.2508,"440823","遂溪县",
110.417,21.1434,"440800","湛江市",
110.054,20.796,"440882","雷州市",
116.824,20.7034,"446000","东沙群岛",
110.209,20.4242,"440825","徐闻县",
114.458,22.8943,"441300","惠州市",
114.989,22.9424,"441323","惠东县",
114.545,22.5429,"440300","深圳市",
113.735,22.1174,"440400","珠海市"
];
一个从Mapinfo 广东地图 中切出 深圳地图 和 [...]]]></description>
		<wfw:commentRss>http://618119.com/archives/2008/01/15/64.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
