osman hömek / not defteri

November 21, 2008

esri ve oracle spatial

Filed under: arcsde, geodatabase, oracle spatial — osman @ 4:42 pm

Bildiğiniz gibi ESRI, 9.3  versiyonunu yeni çıkardı. Peşinede SP1 geldi. 

Gelen en büyük yeniliklerden birisi de ArcSDE yi Oracle üzerine kurarken, ArcSDE nin SHAPE geometry kolonu yerineOracle Spatial ın SDO_GEOMETRY kolonunu seçilebiliyor olması. Bu özellik aslında eskiden de vardı, ancak 9.3 ün kurulumundanSeçilebilir halde olacak kadar açığa çıkmış değildi. 

Bu durum bize Spatial Join gibi coğrafi işlemler için Oracle Spatial ın gücünü de aynı zamanda kullanma imkanı verdi. 

Birazda teknik detaylara inelim. 

Sistem:Arcgis Server 9.3ArcSde 9.3Oracle 10g R2 Patch 1

Enterprise Edition 

ArcSDE, Oracle üzerine SDO_GEOMETRY kolonu kullandırılarak kuruldu. 

ArcCatalog kullanılarak, Oracle üzerine geo_il ve geo_il_merkezi tabloları upload edildi.İlgili tablolardann Properties/Indexes bölümünden Spatial Index leri silindi. 

CREATE INDEX MI_GEO_IL_MERKEZI_GI ON MI_GEO_IL_MERKEZI(GEOLOC) INDEXTYPE IS MDSYS.SPATIAL_INDEX 

Script I aracılığı ile Oracle Spatail üzerinden Spatial Index verildi. 

SELECT  a.kod, b.ad, a.tip, b.kod, b.ad, a.tip from geo_il_merkezi a, geo_il b where SDO_CONTAINS(b.shape, a.shape)=’TRUE’ order by a.ad 

Böylelikle yukarıdaki sql cümlesi çalıştırılabiliyordu. Ancak yapılan testler sonrasında performansın rezalet olduğu görüldü. 

Sonrasında  

/*+ ORDERED INDEX(GEO_IL_MERKEZI_GI) */  betiği eklenerek, SQL cümlesi çalıştırılırken ismi belirtilen INDEX in kullanılması zorunlu hale getirildi.Burada önemli olan veya araştırılması gereken konu index in ORDERED anahtar kelimesi ile verilmesi. Şayet bu anahtar kelime kullanılmaz iseSql sonucu yine çok yavaş dönüyordu. 

Son olarak SQL cümlemiz aşağıdakigibi oldu ve performansı gayet id. 1sn nin altında cevap dönüyordu. 

SELECT  /*+ ORDERED INDEX(GEO_IL_MERKEZI_GI) */ a.kod, b.ad, a.tip, b.kod, b.ad, a.tip from geo_il_merkezi a, geo_il b where SDO_CONTAINS(b.shape, a.shape)=’TRUE’ order by a.ad

November 18, 2008

ajaxtan geriye nesne döndürmek için

Filed under: arcobjects, development — osman @ 5:03 pm

Label1.Text = objectid.ToString() + ” : “ + il_adi;string lbl1BackString = “”;

using (System.IO.StringWriter sw = new System.IO.StringWriter()){

HtmlTextWriter htw = new HtmlTextWriter(sw);Label1.RenderControl(htw);

lbl1BackString = sw.ToString();

}

CallbackResult CallBackLabel1 = new CallbackResult(“span”, “Label1″, “innercontent”, lbl1BackString);map1.CallbackResults.Add(CallBackLabel1);

92 mouse whell

Filed under: arcobjects — osman @ 2:22 pm

Change Scroll Wheel Zoom Direction

By default, when using the mouse scroll wheel to navigate a map, moving the mouse wheel toward you (back) will zoom out and away from you (forward) will zoom in.  The Web ADF uses a JavaScript variable, mouseWheelAwayZoomIn to set this behavior.  By default, the value is true.  To switch this behavior, add the following script content in the aspx page that contains the map control.  This content must be added within or below the HTML form that contains the map :

<script language="javascript" type="text/javascript">   mouseWheelAwayZoomIn = false; <script>

9.2 adf javascript

Filed under: arcobjects — osman @ 2:21 pm
JavaScript File  Description
display_common.js Required for all Web ADF controls.  Contains standard JavaScript functions for CSS layer display, element positioning, conversion and debugging.   
display_contextmenu.js Required for Web ADF controls that use the ContextMenu control.  Supports the display and selection of items within a context menu.
display_dotnetadf.js Required for all Web ADF controls.  Manages initial postback or callback requests and responses.   
display_editorSnapTip.js Manages snapping interaction and display properties for the EditorTask control.
display_editortask.js Manages client functions to edit spatial and attribute data with the EditorTask control.
display_floatingpanel.js Required for all Web ADF controls that use the FloatingPanel control.  Supports the display, movement and content of a floating panel. 
display_magnify.js Manages the display and navigation of the Magnifier control. 
display_map.js Manages the display of Map control contents (resources) and map actions.
display_maptips.js Contains functions to generate interactive map tips in a browser.  
display_navigation.js Manages the display and user interaction with the Navigation control. 
display_overview.js Manages map content and area of interest details for an OverviewMap control.
display_pagelayout.js Manages the display of PageLayout control contents (resources) and page layout actions.
display_task.js Required to support task execution and activity indicators.  
display_taskresults.js Manages the display and interaction with the TaskResults control.
display_toolbar.js Manages tool, command and drop down interaction in a Toolbar control. 
display_treeviewplus.js Required for all Web ADF controls that use the TreeViewPlus control, such as the Toc and TaskResults controls.  Manages node order and interaction.  
display_vector.js Manages vector based drawing tools and interaction with Map and PageLayout controls.  Utilizes VML and CSS.

9.2 export image /printout

Filed under: arcobjects — osman @ 10:40 am

public MapImage MapExport(ESRI.ArcGIS.ADF.Web.UI.WebControls.Map mapControl, ESRI.ArcGIS.ADF.ArcGISServer.Envelope exportedExtent, esriImageFormat imageFormat, int imageHeight, int imageWidth, double imageDpi, esriImageReturnType returnType){MapDescription mapDescription;ImageDescription imageDescription;

MapFunctionality mapFunctionality = GetMapFunctionality(mapControl);mapDescription = GetMapDescription(mapFunctionality);//Set the current map extent

mapDescription.MapArea.Extent = (exportedExtent != null) ? exportedExtent : ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Converter.FromAdfEnvelope(mapControl.Extent);imageDescription = CreateImageDescription(imageFormat, imageHeight, imageWidth, imageDpi, returnType);MapResourceBase mapResource = (MapResourceBase)mapFunctionality.Resource;MapServerProxy mapServerProxy = mapResource.MapServerProxy;// Return MapImage class

return mapServerProxy.ExportMapImage(mapDescription, imageDescription);}private static MapDescription GetMapDescription(MapFunctionality mapFunctionality){

MapDescription mapDescription = mapFunctionality.MapDescription;return mapDescription;}private static MapFunctionality GetMapFunctionality(ESRI.ArcGIS.ADF.Web.UI.WebControls.Map mapControl){int resItemIndex = 1;

MapFunctionality mapFunctionality = (MapFunctionality)mapControl.GetFunctionality(resItemIndex);return mapFunctionality;}

private static ImageDescription CreateImageDescription(esriImageFormat imageFormat, int imageHeight, int imageWidth, double imageDpi, esriImageReturnType returnType){ImageDescription imageDescription = new ImageDescription();

ImageType imageType = new ImageType();imageType.ImageFormat = imageFormat;// Return url to map image or MIME data

imageType.ImageReturnType = returnType;ImageDisplay imageDisplay = new ImageDisplay();imageDisplay.ImageHeight = imageHeight;imageDisplay.ImageWidth = imageWidth;

imageDisplay.ImageDPI = imageDpi;

imageDescription.ImageDisplay = imageDisplay;

imageDescription.ImageType = imageType;

return imageDescription;}public string GetMapImageUrl(ESRI.ArcGIS.ADF.Web.UI.WebControls.Map mapControl, esriImageFormat imageFormat, int imageHeight, int imageWidth, double imageDpi){

MapImage mapImage = MapExport(mapControl, null, imageFormat, imageHeight, imageWidth, imageDpi, esriImageReturnType.esriImageReturnURL);return mapImage.ImageURL;}protected void Button1_Click1(object sender, EventArgs e){ESRI.ArcGIS.ADF.Web.Geometry.Envelope env = mapBig.Extent;ESRI.ArcGIS.ADF.ArcGISServer.

EnvelopeN envN = ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Converter.FromAdfEnvelope(env);//Create MapExtent and use it to update the MapArea property of MapDescription

ESRI.ArcGIS.ADF.ArcGISServer.MapExtent mext = new ESRI.ArcGIS.ADF.ArcGISServer.MapExtent();mext.Extent = envN;MapImage mImage = MapExport(mapBig, mext.Extent, esriImageFormat.esriImageJPG, 300, 300, 72.0, esriImageReturnType.esriImageReturnURL);String mapPrintURL = mImage.ImageURL;HyperLink1.NavigateUrl = mImage.ImageURL;HyperLink1.Target = “_blank”;HyperLink1.Text =

“Resmi Gor”;} ——-

using ESRI.ArcGIS.ADF.ArcGISServer;using ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer;

November 7, 2008

map timeout 9.2 web.adf

Filed under: arcobjects — osman @ 11:46 am

haritanin session degerini degistirmek avascript ile mümkün

var maximumLapseTime = 20;

buradaki değer dakika cinsinden,  default değer 10

eğer istenirse aşağıdaki gibi bu süreyi sonsuz da yapabiliyoruz

var maximumLapseTime = Infinity;

http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/timeouts.htm

Powered by WordPress